Skip to content

Commit

Permalink
Remove invalid doctest from bootstrap.py.
Browse files Browse the repository at this point in the history
Make sure that if the test is failed, the CI will stop the build.
  • Loading branch information
kennytm committed Sep 2, 2017
1 parent efceda2 commit 4d06185
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/bootstrap/bootstrap.py
Expand Up @@ -523,10 +523,6 @@ def program_config(self, program):
>>> rb.config_toml = 'rustc = "rustc"\\n'
>>> rb.program_config('rustc')
'rustc'
>>> cargo_path = rb.program_config('cargo')
>>> cargo_path.rstrip(".exe") == os.path.join("/tmp/rust",
... "bin", "cargo")
True
>>> rb.config_toml = ''
>>> cargo_path = rb.program_config('cargo')
>>> cargo_path.rstrip(".exe") == os.path.join(rb.bin_root(),
Expand Down
6 changes: 4 additions & 2 deletions src/bootstrap/bootstrap_test.py
Expand Up @@ -15,6 +15,7 @@
import unittest
import tempfile
import hashlib
import sys

from shutil import rmtree

Expand Down Expand Up @@ -110,5 +111,6 @@ def test_same_dates(self):
TEST_LOADER.loadTestsFromTestCase(VerifyTestCase),
TEST_LOADER.loadTestsFromTestCase(ProgramOutOfDate)])

RUNNER = unittest.TextTestRunner(verbosity=2)
RUNNER.run(SUITE)
RUNNER = unittest.TextTestRunner(stream=sys.stdout, verbosity=2)
result = RUNNER.run(SUITE)
sys.exit(0 if result.wasSuccessful() else 1)

0 comments on commit 4d06185

Please sign in to comment.