Skip to content

Commit e22a3cf

Browse files
committed
Auto merge of #44268 - kennytm:fix-python-bootstrap-test, r=Mark-Simulacrum
rustbuild: Remove invalid doctest from bootstrap.py
2 parents a3beb8f + 4d06185 commit e22a3cf

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/bootstrap/bootstrap.py

-4
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,6 @@ def program_config(self, program):
523523
>>> rb.config_toml = 'rustc = "rustc"\\n'
524524
>>> rb.program_config('rustc')
525525
'rustc'
526-
>>> cargo_path = rb.program_config('cargo')
527-
>>> cargo_path.rstrip(".exe") == os.path.join("/tmp/rust",
528-
... "bin", "cargo")
529-
True
530526
>>> rb.config_toml = ''
531527
>>> cargo_path = rb.program_config('cargo')
532528
>>> cargo_path.rstrip(".exe") == os.path.join(rb.bin_root(),

src/bootstrap/bootstrap_test.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import unittest
1616
import tempfile
1717
import hashlib
18+
import sys
1819

1920
from shutil import rmtree
2021

@@ -110,5 +111,6 @@ def test_same_dates(self):
110111
TEST_LOADER.loadTestsFromTestCase(VerifyTestCase),
111112
TEST_LOADER.loadTestsFromTestCase(ProgramOutOfDate)])
112113

113-
RUNNER = unittest.TextTestRunner(verbosity=2)
114-
RUNNER.run(SUITE)
114+
RUNNER = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
115+
result = RUNNER.run(SUITE)
116+
sys.exit(0 if result.wasSuccessful() else 1)

0 commit comments

Comments
 (0)