| OLD | NEW |
| 1 AUTHOR = """ | 1 AUTHOR = """ |
| 2 uril@redhat.com (Uri Lublin) | 2 uril@redhat.com (Uri Lublin) |
| 3 drusso@redhat.com (Dror Russo) | 3 drusso@redhat.com (Dror Russo) |
| 4 mgoldish@redhat.com (Michael Goldish) | 4 mgoldish@redhat.com (Michael Goldish) |
| 5 dhuff@redhat.com (David Huff) | 5 dhuff@redhat.com (David Huff) |
| 6 aeromenk@redhat.com (Alexey Eromenko) | 6 aeromenk@redhat.com (Alexey Eromenko) |
| 7 mburns@redhat.com (Mike Burns) | 7 mburns@redhat.com (Mike Burns) |
| 8 """ | 8 """ |
| 9 TIME = 'MEDIUM' | 9 TIME = 'MEDIUM' |
| 10 NAME = 'KVM test' | 10 NAME = 'KVM test' |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 str = """ | 33 str = """ |
| 34 # This string will be parsed after build.cfg. Make any desired changes to the | 34 # This string will be parsed after build.cfg. Make any desired changes to the |
| 35 # build configuration here. For example: | 35 # build configuration here. For example: |
| 36 #release_tag = 84 | 36 #release_tag = 84 |
| 37 """ | 37 """ |
| 38 | 38 |
| 39 parser = kvm_config.Parser() | 39 parser = kvm_config.Parser() |
| 40 parser.parse_file(os.path.join(kvm_test_dir, "build.cfg")) | 40 parser.parse_file(os.path.join(kvm_test_dir, "build.cfg")) |
| 41 parser.parse_string(str) | 41 parser.parse_string(str) |
| 42 if not kvm_utils.run_tests(parser.get_dicts(), job): | 42 if not kvm_utils.run_tests(parser, job): |
| 43 logging.error("KVM build step failed, exiting.") | 43 logging.error("KVM build step failed, exiting.") |
| 44 sys.exit(1) | 44 sys.exit(1) |
| 45 | 45 |
| 46 str = """ | 46 str = """ |
| 47 # This string will be parsed after tests.cfg. Make any desired changes to the | 47 # This string will be parsed after tests.cfg. Make any desired changes to the |
| 48 # test configuration here. For example: | 48 # test configuration here. For example: |
| 49 #display = sdl | 49 #display = sdl |
| 50 #install, setup: timeout_multiplier = 3 | 50 #install, setup: timeout_multiplier = 3 |
| 51 """ | 51 """ |
| 52 | 52 |
| 53 parser = kvm_config.Parser() | 53 parser = kvm_config.Parser() |
| 54 parser.parse_file(os.path.join(kvm_test_dir, "tests.cfg")) | 54 parser.parse_file(os.path.join(kvm_test_dir, "tests.cfg")) |
| 55 | 55 |
| 56 if args: | 56 if args: |
| 57 # We get test parameters from command line | 57 # We get test parameters from command line |
| 58 for arg in args: | 58 for arg in args: |
| 59 try: | 59 try: |
| 60 (key, value) = re.findall("(.*)=(.*)", arg)[0] | 60 (key, value) = re.findall("(.*)=(.*)", arg)[0] |
| 61 if key == "only": | 61 if key == "only": |
| 62 str += "only %s\n" % value | 62 str += "only %s\n" % value |
| 63 elif key == "no": | 63 elif key == "no": |
| 64 str += "no %s\n" % value | 64 str += "no %s\n" % value |
| 65 else: | 65 else: |
| 66 str += "%s = %s\n" % (key, value) | 66 str += "%s = %s\n" % (key, value) |
| 67 except IndexError: | 67 except IndexError: |
| 68 pass | 68 pass |
| 69 parser.parse_string(str) | 69 parser.parse_string(str) |
| 70 | 70 |
| 71 logging.info("Selected tests:") | 71 kvm_utils.run_tests(parser, job) |
| 72 for i, d in enumerate(parser.get_dicts()): | |
| 73 logging.info("Test %4d: %s" % (i + 1, d["shortname"])) | |
| 74 kvm_utils.run_tests(parser.get_dicts(), job) | |
| 75 | 72 |
| 76 # Generate a nice HTML report inside the job's results dir | 73 # Generate a nice HTML report inside the job's results dir |
| 77 kvm_utils.create_report(kvm_test_dir, job.resultdir) | 74 kvm_utils.create_report(kvm_test_dir, job.resultdir) |
| OLD | NEW |