@@ -39,7 +39,7 @@ str = """
parser = kvm_config.Parser()
parser.parse_file(os.path.join(kvm_test_dir, "build.cfg"))
parser.parse_string(str)
-if not kvm_utils.run_tests(parser.get_dicts(), job):
+if not kvm_utils.run_tests(parser, job):
logging.error("KVM build step failed, exiting.")
sys.exit(1)
@@ -68,10 +68,7 @@ if args:
pass
parser.parse_string(str)
-logging.info("Selected tests:")
-for i, d in enumerate(parser.get_dicts()):
- logging.info("Test %4d: %s" % (i + 1, d["shortname"]))
-kvm_utils.run_tests(parser.get_dicts(), job)
+kvm_utils.run_tests(parser, job)
# Generate a nice HTML report inside the job's results dir
kvm_utils.create_report(kvm_test_dir, job.resultdir)
@@ -1084,20 +1084,23 @@ def get_hash_from_file(hash_path, dvd_basename):
return line.split()[0]
-def run_tests(test_list, job):
+def run_tests(parser, job):
"""
Runs the sequence of KVM tests based on the list of dictionaries
generated by the configuration system, handling dependencies.
- @param test_list: List with all dictionary test parameters.
+ @param parser: Config parser object.
@param job: Autotest job object.
@return: True, if all tests ran passed, False if any of them failed.
"""
+ for i, d in enumerate(parser.get_dicts()):
+ logging.info("Test %4d: %s" % (i + 1, d["shortname"]))
+
status_dict = {}
failed = False
- for dict in test_list:
+ for dict in parser.get_dicts():
if dict.get("skip") == "yes":
continue
dependencies_satisfied = True