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

Unified Diff: buildbot/scripts/master/factory/commands.py

Issue 1733026: Support --gtest_filter for try jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: '' Created 10 years, 8 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 | « no previous file | buildbot/scripts/master/try_job_base.py » ('j') | depot_tools/trychange.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: buildbot/scripts/master/factory/commands.py
===================================================================
--- buildbot/scripts/master/factory/commands.py (revision 46112)
+++ buildbot/scripts/master/factory/commands.py (working copy)
@@ -151,6 +151,23 @@
cmd.extend(arg_list)
return cmd
+ @staticmethod
+ def DoStepFilterTest(bStep):
+ """Examines the 'testfilters' property of the build and determines if
+ the step should run; True for yes."""
+ try:
+ filters = bStep.getProperty('testfilters')
+ except:
+ return True
+
+ for filter in filters:
+ if filter == bStep.name:
+ return True
+ if filter.startswith(("%s:" % bStep.name)):
+ bStep.command.append("--gtest_filter=%s" % filter.split(':',1)[1])
+ return True
+ return False
+
def AddTestStep(self, command_class, test_name, test_command,
test_description='', timeout=600, workdir=None, env=None,
locks=None, halt_on_failure=False):
@@ -175,10 +192,15 @@
locks: any locks to acquire for this test
halt_on_failure: whether the current build should halt if this step fails
"""
+ doStepCondition = True
+ if command_class == gtest_command.GTestCommand:
+ doStepCondition = self.DoStepFilterTest
+
self._factory.addStep(
command_class,
name=test_name,
timeout=timeout,
+ doStepIf=doStepCondition,
workdir=workdir,
env=env,
# TODO(bradnelson): FIXME
« no previous file with comments | « no previous file | buildbot/scripts/master/try_job_base.py » ('j') | depot_tools/trychange.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698