File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 1- """Bootstrap tests"""
1+ """Bootstrap tests
2+
3+ Run these with `x test bootstrap`, or `python -m unittest bootstrap_test.py`."""
24
35from __future__ import absolute_import , division , print_function
46import os
@@ -120,15 +122,3 @@ def test_set_codegen_backends(self):
120122 build = self .serialize_and_parse (["--enable-full-tools" ])
121123 self .assertNotEqual (build .config_toml .find ("codegen-backends = ['llvm']" ), - 1 )
122124
123- if __name__ == '__main__' :
124- SUITE = unittest .TestSuite ()
125- TEST_LOADER = unittest .TestLoader ()
126- SUITE .addTest (doctest .DocTestSuite (bootstrap ))
127- SUITE .addTests ([
128- TEST_LOADER .loadTestsFromTestCase (VerifyTestCase ),
129- TEST_LOADER .loadTestsFromTestCase (GenerateAndParseConfig ),
130- TEST_LOADER .loadTestsFromTestCase (ProgramOutOfDate )])
131-
132- RUNNER = unittest .TextTestRunner (stream = sys .stdout , verbosity = 2 )
133- result = RUNNER .run (SUITE )
134- sys .exit (0 if result .wasSuccessful () else 1 )
Original file line number Diff line number Diff line change @@ -2664,7 +2664,12 @@ impl Step for Bootstrap {
26642664 /// Tests the build system itself.
26652665 fn run ( self , builder : & Builder < ' _ > ) {
26662666 let mut check_bootstrap = Command :: new ( & builder. python ( ) ) ;
2667- check_bootstrap. arg ( "bootstrap_test.py" ) . current_dir ( builder. src . join ( "src/bootstrap/" ) ) ;
2667+ check_bootstrap
2668+ . arg ( "-m" )
2669+ . arg ( "unittest" )
2670+ . arg ( "bootstrap_test.py" )
2671+ . current_dir ( builder. src . join ( "src/bootstrap/" ) )
2672+ . args ( builder. config . test_args ( ) ) ;
26682673 try_run ( builder, & mut check_bootstrap) . unwrap ( ) ;
26692674
26702675 let host = builder. config . build ;
You can’t perform that action at this time.
0 commit comments