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 )
| 113 | ############################################################################### |
| 114 | |
| 115 | def 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 | ############################################################################### |
no test coverage detected