Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: client/tests/kvm/control

Issue 6539001: Merge remote branch 'cros/upstream' into master. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/iozone/iozone.py ('k') | client/tests/kvm/control.parallel » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/kvm/control
diff --git a/client/tests/kvm/control b/client/tests/kvm/control
index d226adf3751a5ab2bbbcd84ccb7a84e474a781cc..be376787f7ada13ffd7240f9d1ed29dcc19f198d 100644
--- a/client/tests/kvm/control
+++ b/client/tests/kvm/control
@@ -35,13 +35,11 @@ str = """
# build configuration here. For example:
#release_tag = 84
"""
-build_cfg = kvm_config.config()
-# As the base test config is quite large, in order to save memory, we use the
-# fork_and_parse() method, that creates another parser process and destroys it
-# at the end of the parsing, so the memory spent can be given back to the OS.
-build_cfg_path = os.path.join(kvm_test_dir, "build.cfg")
-build_cfg.fork_and_parse(build_cfg_path, str)
-if not kvm_utils.run_tests(build_cfg.get_generator(), job):
+
+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):
logging.error("KVM build step failed, exiting.")
sys.exit(1)
@@ -49,10 +47,11 @@ str = """
# This string will be parsed after tests.cfg. Make any desired changes to the
# test configuration here. For example:
#display = sdl
-#install|setup: timeout_multiplier = 3
+#install, setup: timeout_multiplier = 3
"""
-tests_cfg = kvm_config.config()
-tests_cfg_path = os.path.join(kvm_test_dir, "tests.cfg")
+
+parser = kvm_config.Parser()
+parser.parse_file(os.path.join(kvm_test_dir, "tests.cfg"))
if args:
# We get test parameters from command line
@@ -67,11 +66,12 @@ if args:
str += "%s = %s\n" % (key, value)
except IndexError:
pass
-tests_cfg.fork_and_parse(tests_cfg_path, str)
+parser.parse_string(str)
-# Run the tests
-kvm_utils.run_tests(tests_cfg.get_generator(), job)
+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)
# Generate a nice HTML report inside the job's results dir
kvm_utils.create_report(kvm_test_dir, job.resultdir)
-
« no previous file with comments | « client/tests/iozone/iozone.py ('k') | client/tests/kvm/control.parallel » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698