Merge "Fail when no test case selected"
This commit is contained in:
commit
f59d90adfd
|
@ -256,6 +256,10 @@ def _call_testr_with_list(opts, test_list, others):
|
|||
print("\n".join(test_list))
|
||||
return 0
|
||||
|
||||
if not test_list:
|
||||
print("No testcase selected to run")
|
||||
return 8
|
||||
|
||||
ec = call_testr(None, opts.subunit, opts.pretty, opts.list,
|
||||
opts.slowest, opts.parallel, opts.concurrency,
|
||||
opts.until_failure, opts.color, test_list, others)
|
||||
|
|
|
@ -102,3 +102,6 @@ class TestReturnCodes(base.TestCase):
|
|||
|
||||
def test_list(self):
|
||||
self.assertRunExit('ostestr --list', 0)
|
||||
|
||||
def test_no_test(self):
|
||||
self.assertRunExit('ostestr --regex a --black-regex a', 8)
|
||||
|
|
Loading…
Reference in New Issue