2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-02 20:52:13 +00:00
Files
build/test/double_loading.py
github-actions[bot] def908ed01 [Backport version/4.10.0] python3 shebang (#266)
* python3 shebang

(cherry picked from commit 9f0d565b06482a90b59d07ef9e7b9aadd698926c)

* CI: execute python scripts via shebang

(cherry picked from commit cf36b637abe2125cf6895bec593b4cbcf71ae570)

---------

Co-authored-by: Nikita Kniazev <nok.raven@gmail.com>
2023-04-17 14:23:50 -05:00

32 lines
991 B
Python

#!/usr/bin/env python3
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or copy at
# https://www.bfgroup.xyz/b2/LICENSE.txt)
import BoostBuild
t = BoostBuild.Tester()
# Regression test for double loading of the same Jamfile.
t.write("jamroot.jam", "")
t.write("jamfile.jam", "build-project subdir ;")
t.write("subdir/jamfile.jam", 'ECHO "Loaded subdir" ;')
t.run_build_system(subdir="subdir")
t.expect_output_lines("Loaded subdir")
# Regression test for a more contrived case. The top-level Jamfile refers to
# subdir via use-project, while subdir's Jamfile is being loaded. The
# motivation why use-project referring to subprojects is useful can be found
# at: http://article.gmane.org/gmane.comp.lib.boost.build/3906
t.write("jamroot.jam", "")
t.write("jamfile.jam", "use-project /subdir : subdir ;")
t.write("subdir/jamfile.jam", "project subdir ;")
t.run_build_system(subdir="subdir");
t.cleanup()