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

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: Don't wrap with bash for presubmit testing. CQ has no android_tools directory. 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
« no previous file with comments | « build/android/buildbot/bb_run_bot.py ('k') | build/android/pylib/gtest/gtest_config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3020947a9d6152ce8d238772faf73fa3dc191c0e 100644
--- a/build/android/pylib/gtest/dispatch.py
+++ b/build/android/pylib/gtest/dispatch.py
@@ -33,28 +33,30 @@ def _FullyQualifiedTestSuites(exe, option_test_suite, build_type):
'/tmp/chrome/src/out/Debug/content_unittests_apk/'
'content_unittests-debug.apk')
"""
+ def GetQualifiedSuite(suite):
+ if suite.is_suite_exe:
+ 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)
+
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):
+ # 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):
« no previous file with comments | « build/android/buildbot/bb_run_bot.py ('k') | build/android/pylib/gtest/gtest_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698