Merge "Fail tempest if 0 tests are run"
diff --git a/tempest/tests/test_wrappers.py b/tempest/tests/test_wrappers.py
index f6830a1..3f4ac7d 100644
--- a/tempest/tests/test_wrappers.py
+++ b/tempest/tests/test_wrappers.py
@@ -76,7 +76,7 @@
# version or an sdist to work. so make the test directory a git repo
# too.
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):
# Git init is required for the pbr testr command. pbr requires a git
@@ -86,7 +86,7 @@
self.assertRunExit('pretty_tox.sh', 1)
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):
self.assertRunExit('pretty_tox_serial.sh', 1)
diff --git a/tools/subunit-trace.py b/tools/subunit-trace.py
index 7f972aae..57e58f2 100755
--- a/tools/subunit-trace.py
+++ b/tools/subunit-trace.py
@@ -234,6 +234,9 @@
stream.run(result)
finally:
result.stopTestRun()
+ if count_tests('status', '.*') == 0:
+ print("The test run didn't actually run any tests")
+ return 1
if args.post_fails:
print_fails(sys.stdout)
print_summary(sys.stdout)