aboutsummaryrefslogtreecommitdiff
path: root/buildbot_test_toolchains.py
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2015-08-28 11:05:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-08-28 18:09:09 -0700
commit364131220999a99b408c5ef848da17844028c604 (patch)
treec05b174c83b6fd5c981f2d82b9b095031a55a602 /buildbot_test_toolchains.py
parentd6ff63ad5f1c492de12c39f93fda86b17bfd9134 (diff)
downloadtoolchain-utils-364131220999a99b408c5ef848da17844028c604.tar.gz
Add a new option '--schedv2' so later invocation to crosperf uses the new scheduler.
This option is added to buildbot_test_toolchains.py & test_toolchains.py. TEST=None Change-Id: I8f31d0dd7b4b1db6af35759dd476f0f55e224366 Reviewed-on: https://chrome-internal-review.googlesource.com/228645 Commit-Ready: Han Shen <shenhan@google.com> Tested-by: Han Shen <shenhan@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'buildbot_test_toolchains.py')
-rwxr-xr-xbuildbot_test_toolchains.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py
index a663150b..c899758f 100755
--- a/buildbot_test_toolchains.py
+++ b/buildbot_test_toolchains.py
@@ -38,7 +38,7 @@ class ToolchainComparator():
Class for doing the nightly tests work.
"""
- def __init__(self, board, remotes, chromeos_root, weekday, patches):
+ def __init__(self, board, remotes, chromeos_root, weekday, patches, schedv2=False):
self._board = board
self._remotes = remotes
self._chromeos_root = chromeos_root
@@ -48,6 +48,7 @@ class ToolchainComparator():
self._build = "%s-release" % board
self._patches = patches.split(',')
self._patches_string = '_'.join(str(p) for p in self._patches)
+ self._schedv2 = schedv2
if not weekday:
self._weekday = time.strftime("%a")
@@ -132,8 +133,13 @@ class ToolchainComparator():
crosperf = os.path.join(TOOLCHAIN_DIR,
"crosperf",
"crosperf")
- command = ("%s --no_email=True --results_dir=%s %s" %
- (crosperf, self._reports_dir, experiment_file))
+ schedv2_opts = '--schedv2 --logging_level=verbose' if self._schedv2 else ''
+ command = ("{crosperf} --no_email=True --results_dir={r_dir} "
+ "{schedv2_opts} {exp_file}").format(
+ crosperf=crosperf,
+ r_dir=self._reports_dir,
+ schedv2_opts=schedv2_opts,
+ exp_file=experiment_file)
ret = self._ce.RunCommand(command)
if ret != 0:
@@ -267,6 +273,12 @@ def Main(argv):
help="The patches to use for the testing, "
"seprate the patch numbers with ',' "
"for more than one patches.")
+ parser.add_option("--schedv2",
+ dest="schedv2",
+ action="store_true",
+ default=False,
+ help="Pass --schedv2 to crosperf.")
+
options, _ = parser.parse_args(argv)
if not options.board:
print "Please give a board."
@@ -283,7 +295,8 @@ def Main(argv):
patches = USE_NEXT_GCC_PATCH
fc = ToolchainComparator(options.board, options.remote,
- options.chromeos_root, options.weekday, patches)
+ options.chromeos_root, options.weekday, patches,
+ options.schedv2)
return fc.DoAll()