diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-02-01 11:50:41 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-02-02 17:05:38 +0100 |
commit | 3ae50942f161e2e8fa6ecd69a9c17b681d419905 (patch) | |
tree | 553fd9186f87317ad6145c0447d2a8095cd19507 /tests/qemu-iotests/testrunner.py | |
parent | ca502ca60dab85b11a7fad5978ab3de94c296fb6 (diff) |
iotests: check: return 1 on failure
We should indicate failure by exit code, not only output.
Reported-by: Peter Maydell
Fixes: f203080bbd9f9e5b31041b1f2afcd6040c5aaec5
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210201085041.3079-1-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/testrunner.py')
-rw-r--r-- | tests/qemu-iotests/testrunner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py index 24b3fba115..25754e9a09 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -318,7 +318,7 @@ class TestRunner(ContextManager['TestRunner']): return res - def run_tests(self, tests: List[str]) -> None: + def run_tests(self, tests: List[str]) -> bool: n_run = 0 failed = [] notrun = [] @@ -363,5 +363,7 @@ class TestRunner(ContextManager['TestRunner']): if failed: print('Failures:', ' '.join(failed)) print(f'Failed {len(failed)} of {n_run} iotests') + return False else: print(f'Passed all {n_run} iotests') + return True |