[Qemu-devel] [RFC 4/6] device-crash-test: Exit immediately on fatal failures on quick mode

Eduardo Habkost posted 6 patches 8 years, 4 months ago
[Qemu-devel] [RFC 4/6] device-crash-test: Exit immediately on fatal failures on quick mode
Posted by Eduardo Habkost 8 years, 4 months ago
If we're running on quick mode, we won't wait for the full test
run, and will exit immediately if a fatal failure is found.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 scripts/device-crash-test | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 0bd599d395..4c23ffa449 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -583,10 +583,14 @@ def main():
 
             if wl.get('fatal') or (args.strict and level >= logging.WARN):
                 fatal_failures.append(r)
+                if args.quick:
+                    break
 
             if expected_match and expected_match[0] != i:
                 logger.warn("Didn't fail as expected: %s", formatTestCase(t))
 
+        if fatal_failures and args.quick:
+            break
 
     logger.info("Total: %d test cases", total)
     if skipped:
-- 
2.13.5