| 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
|
|
|