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

Unified Diff: build/android/pylib/gtest/dispatch.py

Issue 12758002: Add android buildbot support for exe tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: syntax fix Created 7 years, 9 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
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..b9a372bd4dc93329c48910bb398d90260f4913f1 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 = [gtest_config.Suite(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):
+ def GetQualifiedSuite(suite):
frankf 2013/03/12 17:46:31 nit: let's move this to the top of the outer metho
Isaac (away) 2013/03/13 03:24:30 Done.
+ if suite.is_exe_suite:
+ relpath = suite.name
+ else:
+ # out/(Debug|Release)/$SUITE_apk/$SUITE-debug.apk
+ relpath = os.path.join(suite.name + '_apk', suite.name + '-debug.apk')
+ return suite.name, os.path.join(test_suite_dir, relpath)
+
+ # List of tuples (suite_name, suite_path)
+ qualified_test_suites = map(GetQualifiedSuite, all_test_suites)
+
+ 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):

Powered by Google App Engine
This is Rietveld 408576698