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

Function test_default_toolset_on_os

test/default_toolset.py:115–135  ·  view source on GitHub ↗

Test that the given toolset is used as the default toolset on the given os. Uses hardcoded knowledge of how Boost Build decides on which host OS it is currently running. Note that we must not do much after tricking Boost Build into believing it has a specific host OS as this might mess u

( os, expected_toolset )

Source from the content-addressed store, hash-verified

113###############################################################################
114
115def test_default_toolset_on_os( os, expected_toolset ):
116 """Test that the given toolset is used as the default toolset on the given
117 os. Uses hardcoded knowledge of how Boost Build decides on which host OS it
118 is currently running. Note that we must not do much after tricking Boost
119 Build into believing it has a specific host OS as this might mess up other
120 important internal Boost Build state.
121 """
122
123 t = BoostBuild.Tester("--user-config= --ignore-site-config",
124 pass_toolset=False, use_test_config=False)
125
126 t.write("jamroot.jam", "modules.poke os : .name : %s ;" % os)
127
128 # We need to tell the test system to ignore stderr output as attempting to
129 # load missing toolsets might cause random failures with which we are not
130 # concerned in this test.
131 t.run_build_system(stderr=None)
132 t.expect_output_lines(configuring_default_toolset_message %
133 expected_toolset)
134
135 t.cleanup()
136
137
138###############################################################################

Callers 1

default_toolset.pyFile · 0.85

Calls 4

writeMethod · 0.95
run_build_systemMethod · 0.95
expect_output_linesMethod · 0.95
cleanupMethod · 0.95

Tested by

no test coverage detected