Index: build/android/pylib/gtest/dispatch.py |
diff --git a/build/android/pylib/gtest/dispatch.py b/build/android/pylib/gtest/dispatch.py |
index 3195401edaa490b042d9584d1323c0656732127e..59581d24c62a3809194cbe1791624e148183d2a7 100644 |
--- a/build/android/pylib/gtest/dispatch.py |
+++ b/build/android/pylib/gtest/dispatch.py |
@@ -35,26 +35,28 @@ def _FullyQualifiedTestSuites(exe, option_test_suite, build_type): |
""" |
test_suite_dir = os.path.join(cmd_helper.OutDirectory.get(), build_type) |
if option_test_suite: |
- all_test_suites = [option_test_suite] |
+ all_test_suites = { exe: [option_test_suite] } |
else: |
all_test_suites = gtest_config.STABLE_TEST_SUITES |
- if exe: |
- qualified_test_suites = [os.path.join(test_suite_dir, t) |
- for t in all_test_suites] |
- else: |
- # out/(Debug|Release)/$SUITE_apk/$SUITE-debug.apk |
- qualified_test_suites = [os.path.join(test_suite_dir, |
- t + '_apk', |
- t + '-debug.apk') |
- for t in all_test_suites] |
- for t, q in zip(all_test_suites, qualified_test_suites): |
+ # List of tuples (suite_name, suite_path) |
+ qualified_test_suites = [] |
+ for is_exe_suite, suites_names in all_test_suites.iteritems(): |
+ if is_exe_suite: |
+ qualified_suite = lambda s: (s, os.path.join(test_suite_dir, s)) |
+ else: |
+ # out/(Debug|Release)/$SUITE_apk/$SUITE-debug.apk |
+ qualified_suite = lambda s: (s, os.path.join( |
+ test_suite_dir, s + '_apk', s + '-debug.apk')) |
+ qualified_test_suites += map(qualified_suite, suites_names) |
+ |
+ for t, q in qualified_test_suites: |
if not os.path.exists(q): |
raise Exception('Test suite %s not found in %s.\n' |
'Supported test suites:\n %s\n' |
'Ensure it has been built.\n' % |
(t, q, gtest_config.STABLE_TEST_SUITES)) |
- return zip(all_test_suites, qualified_test_suites) |
+ return qualified_test_suites |
def GetTestsFromDevice(runner): |