1#!/usr/local/bin/python3.8 2 3# Copyright (C) Vladimir Prus 2005. 4# Distributed under the Boost Software License, Version 1.0. (See 5# accompanying file LICENSE_1_0.txt or copy at 6# http://www.boost.org/LICENSE_1_0.txt) 7 8# Tests that we can build a project when the current directory is outside of 9# that project tree, that is 'bjam some_dir' works. 10 11import BoostBuild 12 13# Create a temporary working directory. 14t = BoostBuild.Tester(use_test_config=False) 15 16# Create the needed files. 17t.write("p1/jamroot.jam", "exe hello : hello.cpp ;") 18t.write("p1/hello.cpp", "int main() {}\n") 19t.write("p2/jamroot.jam", """\ 20exe hello2 : hello.cpp ; 21exe hello3 : hello.cpp ; 22""") 23t.write("p2/hello.cpp", "int main() {}\n") 24 25t.run_build_system(["p1", "p2//hello3"]) 26t.expect_addition("p1/bin/$toolset/debug*/hello.exe") 27t.expect_addition("p2/bin/$toolset/debug*/hello3.exe") 28 29t.cleanup() 30