2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-02 20:52:13 +00:00
Files
build/test/wrapper.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

39 lines
795 B
Python

#!/usr/bin/env python3
# Copyright 2004 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
# Test that the user can define his own rule that will call built-in main target
# rule and that this will work.
import BoostBuild
t = BoostBuild.Tester(use_test_config=False)
t.write("jamfile.jam", """
my-test : test.cpp ;
""")
t.write("test.cpp", """
int main() {}
""")
t.write("jamroot.jam", """
using testing ;
rule my-test ( name ? : sources + )
{
name ?= test ;
unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ;
}
IMPORT $(__name__) : my-test : : my-test ;
""")
t.run_build_system()
t.expect_addition("bin/$toolset/debug*/test.passed")
t.cleanup()