MCPcopy Create free account
hub / github.com/boostorg/build / test_source_location

Function test_source_location

v2/test/project_glob.py:42–68  ·  view source on GitHub ↗

Test that when 'source-location' is explicitly-specified glob works relative to the source location.

()

Source from the content-addressed store, hash-verified

40
41
42def test_source_location():
43 """
44 Test that when 'source-location' is explicitly-specified glob works
45 relative to the source location.
46
47 """
48 t = BoostBuild.Tester(use_test_config=False)
49
50 t.write("jamroot.jam", "")
51 t.write("d1/a.cpp", "very bad non-compilable file\n")
52 t.write("d1/src/a.cpp", "int main() {}\n")
53 t.write("d1/jamfile.jam", """\
54project : source-location src ;
55exe a : [ glob *.cpp ] ../d2/d//l ;
56""")
57 t.write("d2/d/l.cpp", """\
58#if defined(_WIN32)
59__declspec(dllexport)
60void force_import_lib_creation() {}
61#endif
62""")
63 t.write("d2/d/jamfile.jam", "lib l : [ glob *.cpp ] ;")
64
65 t.run_build_system(subdir="d1")
66 t.expect_addition("d1/bin/$toolset/debug/a.exe")
67
68 t.cleanup()
69
70
71def test_wildcards_and_exclusion_patterns():

Callers 1

project_glob.pyFile · 0.85

Calls 4

writeMethod · 0.95
run_build_systemMethod · 0.95
expect_additionMethod · 0.95
cleanupMethod · 0.95

Tested by

no test coverage detected