Chromium Code Reviews| Index: appengine/findit/waterfall/trigger_base_swarming_task_pipeline.py |
| diff --git a/appengine/findit/waterfall/trigger_base_swarming_task_pipeline.py b/appengine/findit/waterfall/trigger_base_swarming_task_pipeline.py |
| index f8dbfe1b3558814e2b2c3893ca0145f22d6e8639..f290f020dc02f903f30240b96a4381d4c41ac7d3 100644 |
| --- a/appengine/findit/waterfall/trigger_base_swarming_task_pipeline.py |
| +++ b/appengine/findit/waterfall/trigger_base_swarming_task_pipeline.py |
| @@ -29,7 +29,6 @@ class TriggerBaseSwarmingTaskPipeline(BasePipeline): # pragma: no cover. |
| builder_name, build_number, step_name, |
| tests, iterations): |
| """Returns a SwarmingTaskRequest instance to run the given tests only.""" |
| - |
| # Make a copy of the referred request and drop or overwrite some fields. |
| new_request = copy.deepcopy(ref_request) |
| new_request.name = self._GetSwarmingTaskName(ref_task_id) |
| @@ -47,8 +46,21 @@ class TriggerBaseSwarmingTaskPipeline(BasePipeline): # pragma: no cover. |
| not a.startswith('--test-launcher-filter-file')) |
| ] |
| new_request.extra_args.append('--gtest_filter=%s' % ':'.join(tests)) |
| + |
| + # On Android, this is only supported for gtest, but not for other test |
|
chanli
2016/11/29 23:11:49
Nit: 'this' is a little ambiguous here, maybe chan
stgao
2016/11/30 00:26:27
Good catch. Done.
|
| + # types. E.g. instrumentation tests currently support it via --test-repeat. |
| + # Here we blindly treat all tests on Android as gtest, and let other test |
| + # types fail out, because it is hard to distinguish them programmatically. |
| + # |
| + # https://crbug.com/669632 tracks the effort to unify the command switches |
| + # of the Android test runner that are used here. |
| new_request.extra_args.append('--gtest_repeat=%s' % iterations) |
| - new_request.extra_args.append('--test-launcher-retry-limit=0') |
| + |
| + ref_os = swarming_util.GetTagValue(ref_request.tags, 'os') or '' |
| + if ref_os.lower() == 'android': # Workaround. pragma: no cover. |
| + new_request.extra_args.append('--num_retries=0') |
| + else: |
| + new_request.extra_args.append('--test-launcher-retry-limit=0') |
| # Also rerun disabled tests. Scenario: the test was disabled before Findit |
| # runs any analysis. One possible case: |
| @@ -62,6 +74,9 @@ class TriggerBaseSwarmingTaskPipeline(BasePipeline): # pragma: no cover. |
| # 4. Findit picks the latest Waterfall build of the matching configuration |
| # for the CQ build in which the flaky test is found. |
| # 5. In the picked Waterfall build, the test is already disabled. |
| + # |
| + # Note: test runner on Android doesn't support this flag yet even though it |
| + # exists. |
|
chanli
2016/11/29 23:11:49
Question: If this flag is not supported on Android
stgao
2016/11/30 00:26:27
Ignored. Comments updated.
|
| new_request.extra_args.append('--gtest_also_run_disabled_tests') |
| # Remove the env setting for sharding. |