#NEWLINE# def test_profiles_from_config( cd_to_tmpdir ) : #NEWLINE# #INDENT# qibuild . config . add_build_config ( 'foo' , profiles = [ 'bar' ] ) #NEWLINE# build_worktree = TestBuildWorkTree ( ) #NEWLINE# local_xml = build_worktree . qibuild_xml #NEWLINE# qibuild . profile . configure_build_profile ( local_xml , 'bar' , [ ( 'WITH_BAR' , 'ON' ) ] ) #NEWLINE# build_worktree . set_active_config ( 'foo' ) #NEWLINE# build_config = build_worktree . build_config #NEWLINE# assert ( build_config . profiles == [ 'bar' ] ) #NEWLINE# cmake_args = build_config . cmake_args #NEWLINE# cmake_args = [ x for x in cmake_args if ( 'WITH' in x ) ] #NEWLINE# assert ( cmake_args == [ '-DWITH_BAR=ON' ] )