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

Unified Diff: build/android/pylib/local/device/local_device_test_run.py

Issue 1405853003: Android gtest runner: When skipping test list, don't treat *s as failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix obvious bug Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/local/device/local_device_test_run.py
diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py
index 0b45850cf7cb1ef8f201d7af4471397fdd45830d..200ee4e41676d4519a1889da187bccbb90c6c0cc 100644
--- a/build/android/pylib/local/device/local_device_test_run.py
+++ b/build/android/pylib/local/device/local_device_test_run.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import fnmatch
import functools
import logging
@@ -114,7 +115,15 @@ class LocalDeviceTestRun(test_run.TestRun):
all_fail_results[result.GetName()] = result
results_names = set(r.GetName() for r in results.GetAll())
- tests = [t for t in tests if self._GetTestName(t) not in results_names]
+
+ def has_test_result(name):
+ # When specifying a test filter, names can contain trailing wildcards.
+ # See local_device_gtest_run._ExtractTestsFromFilter()
+ if name.endswith('*'):
+ return any(fnmatch.fnmatch(n, name) for n in results_names)
+ return name in results_names
+
+ tests = [t for t in tests if not has_test_result(self._GetTestName(t))]
tries += 1
logging.info('FINISHED TRY #%d/%d', tries, self._env.max_tries)
if tests:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698