new file mode 100644
@@ -0,0 +1,24 @@
+import os, sys, glob, re
+
+
+class SerialCheckerError(Exception):
+ """
+ Simple wrapper for the builtin Exception class.
+ """
+ pass
+
+
+if __name__ == "__main__":
+ client_dir = os.environ['AUTODIR']
+ pattern = os.environ['KVM_TEST_search_pattern']
+ shortname = os.environ['KVM_TEST_shortname']
+ debugdir = os.path.join(client_dir, "results/default/kvm.%s/debug"
+ % shortname)
+ serial_files = glob.glob(os.path.join(debugdir, 'serial*'))
+
+ fail = [ f for f in serial_files if
+ re.findall(pattern, file(f).read(), re.I) ]
+ if fail:
+ print "%s is found in %s" % (pattern, fail)
+ raise SerialCheckerError("Error found during the check, please "
+ "check the log")
@@ -52,6 +52,10 @@ address_index = 0
# Misc
profilers = kvm_stat
+# pattern to search in guest serial console
+search_pattern = panic
+post_command = "python scripts/check_serial.py"
+post_command_noncritical = no
# Tests
variants:
@@ -1324,10 +1328,9 @@ virtio|virtio_blk|e1000|balloon_check:
variants:
- @qcow2:
image_format = qcow2
- post_command = " python scripts/check_image.py;"
+ post_command += " && python scripts/check_image.py"
remove_image = no
post_command_timeout = 600
- post_command_noncritical = yes
- vmdk:
only Fedora Ubuntu Windows
only smp2