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

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

Issue 2509623003: Fix KeyError caused when filtering gtests on multiple threads. (Closed)
Patch Set: Created 4 years, 1 month 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_gtest_run.py
diff --git a/build/android/pylib/local/device/local_device_gtest_run.py b/build/android/pylib/local/device/local_device_gtest_run.py
index 6796734c7d6a38f24651011b7ed7ca5b2d22378a..a8a8fb7e546d4daa002eabab1f44ffa69a019983 100644
--- a/build/android/pylib/local/device/local_device_gtest_run.py
+++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -338,12 +338,14 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
logging.info('No tests found. Output:')
for l in raw_test_list:
logging.info(' %s', l)
- tests = self._test_instance.FilterTests(tests)
return tests
- # Query all devices in case one fails.
+ # Query all devices in case one fails. Return unfiltered test list
+ # because |FilterTests| function is not threadsafe on older versions
+ # of python due to its use of |fnmatch| module.
test_lists = self._env.parallel_devices.pMap(list_tests).pGet(None)
-
+ test_lists = [self._test_instance.FilterTests(tests)
jbudorick 2016/11/17 00:16:03 This change is ok, but it should also either: - m
+ for tests in test_lists]
# If all devices failed to list tests, raise an exception.
# Check that tl is not None and is not empty.
if all(not tl for tl in test_lists):
« 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