diff mbox

[KVM-AUTOTEST,2/2] KVM test: warn about corrupt PPM files after each test

Message ID 1261585956-5956-2-git-send-email-mgoldish@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Goldish Dec. 23, 2009, 4:32 p.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_preprocessing.py
index 5bae2bd..4e45c76 100644
--- a/client/tests/kvm/kvm_preprocessing.py
+++ b/client/tests/kvm/kvm_preprocessing.py
@@ -270,6 +270,11 @@  def postprocess(test, params, env):
     """
     process(test, params, env, postprocess_image, postprocess_vm)
 
+    # Warn about corrupt PPM files
+    for f in glob.glob(os.path.join(test.debugdir, "*.ppm")):
+        if not ppm_utils.image_verify_ppm_file(f):
+            logging.warn("Found corrupt PPM file: %s", f)
+
     # Should we convert PPM files to PNG format?
     if params.get("convert_ppm_files_to_png") == "yes":
         logging.debug("'convert_ppm_files_to_png' specified; converting PPM"