Merge "Fail tempest if 0 tests are run"
This commit is contained in:
commit
c6dac5315e
@ -76,7 +76,7 @@ class TestWrappers(base.TestCase):
|
|||||||
# version or an sdist to work. so make the test directory a git repo
|
# version or an sdist to work. so make the test directory a git repo
|
||||||
# too.
|
# too.
|
||||||
subprocess.call(['git', 'init'], stderr=DEVNULL)
|
subprocess.call(['git', 'init'], stderr=DEVNULL)
|
||||||
self.assertRunExit('pretty_tox.sh tests.passing', 0)
|
self.assertRunExit('pretty_tox.sh passing', 0)
|
||||||
|
|
||||||
def test_pretty_tox_fails(self):
|
def test_pretty_tox_fails(self):
|
||||||
# Git init is required for the pbr testr command. pbr requires a git
|
# Git init is required for the pbr testr command. pbr requires a git
|
||||||
@ -86,7 +86,7 @@ class TestWrappers(base.TestCase):
|
|||||||
self.assertRunExit('pretty_tox.sh', 1)
|
self.assertRunExit('pretty_tox.sh', 1)
|
||||||
|
|
||||||
def test_pretty_tox_serial(self):
|
def test_pretty_tox_serial(self):
|
||||||
self.assertRunExit('pretty_tox_serial.sh tests.passing', 0)
|
self.assertRunExit('pretty_tox_serial.sh passing', 0)
|
||||||
|
|
||||||
def test_pretty_tox_serial_fails(self):
|
def test_pretty_tox_serial_fails(self):
|
||||||
self.assertRunExit('pretty_tox_serial.sh', 1)
|
self.assertRunExit('pretty_tox_serial.sh', 1)
|
||||||
|
@ -234,6 +234,9 @@ def main():
|
|||||||
stream.run(result)
|
stream.run(result)
|
||||||
finally:
|
finally:
|
||||||
result.stopTestRun()
|
result.stopTestRun()
|
||||||
|
if count_tests('status', '.*') == 0:
|
||||||
|
print("The test run didn't actually run any tests")
|
||||||
|
return 1
|
||||||
if args.post_fails:
|
if args.post_fails:
|
||||||
print_fails(sys.stdout)
|
print_fails(sys.stdout)
|
||||||
print_summary(sys.stdout)
|
print_summary(sys.stdout)
|
||||||
|
Loading…
Reference in New Issue
Block a user