1#!/usr/local/bin/python3.8 2 3# Copyright Vladimir Prus 2005. 4# Distributed under the Boost Software License, Version 1.0. 5# (See accompanying file LICENSE_1_0.txt or copy at 6# http://www.boost.org/LICENSE_1_0.txt) 7 8# Regression test. When Jamfile contained "using whatever ; " and the 'whatever' 9# module declared a project, then all targets in Jamfile were considered to be 10# declared in the project associated with 'whatever', not with the Jamfile. 11 12import BoostBuild 13 14t = BoostBuild.Tester(use_test_config=False) 15 16t.write("a.cpp", "int main() {}\n") 17 18t.write("jamroot.jam", """\ 19using some_tool ; 20exe a : a.cpp ; 21""") 22 23t.write("some_tool.jam", """\ 24import project ; 25project.initialize $(__name__) ; 26rule init ( ) { } 27""") 28 29t.write("some_tool.py", """\ 30from b2.manager import get_manager 31get_manager().projects().initialize(__name__) 32def init(): 33 pass 34""") 35 36t.run_build_system() 37t.expect_addition("bin/$toolset/debug*/a.exe") 38 39t.cleanup() 40