As we now start the vm paused in virt tests, it might be a little while (some seconds) before the screendump commands actually produce a screendump. So let's handle IOErrors (file does not exist) when reading from the screendump ppm file gracefully, just the same way we do with other failures in the main test loop.
CC: Gleb Natapov <[email protected]> Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- qemu/tests/steps.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qemu/tests/steps.py b/qemu/tests/steps.py index 71857dc..0d623e5 100644 --- a/qemu/tests/steps.py +++ b/qemu/tests/steps.py @@ -93,7 +93,11 @@ def barrier_2(vm, words, params, debug_dir, data_scrdump_filename, continue # Read image file - (w, h, data) = ppm_utils.image_read_from_ppm_file(scrdump_filename) + try: + (w, h, data) = ppm_utils.image_read_from_ppm_file(scrdump_filename) + except IOError, e: + logging.warn(e) + continue # Make sure image is valid if not ppm_utils.image_verify_ppm_file(scrdump_filename): -- 1.8.1.2 _______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
