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

Unified Diff: build/android/run_tests.py

Issue 10692153: Fix the errors for run_tests.py (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Support to specific test suite Created 8 years, 5 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/run_tests.py
diff --git a/build/android/run_tests.py b/build/android/run_tests.py
index b2314dba2fa117de96fe4395c7e25916c74bc125..7f573725d295d250dac1a64951c73e87cd673ece 100755
--- a/build/android/run_tests.py
+++ b/build/android/run_tests.py
@@ -76,7 +76,7 @@ _TEST_SUITES = ['base_unittests',
'ui_unittests',
]
-def FullyQualifiedTestSuites(apk):
+def FullyQualifiedTestSuites(apk, test_suites = _TEST_SUITES):
bulach 2012/07/11 09:04:22 nit: since there are only two callers, let's avoid
"""Return a fully qualified list that represents all known suites.
Args:
@@ -89,7 +89,7 @@ def FullyQualifiedTestSuites(apk):
suites = [os.path.join(test_suite_dir,
t + '_apk',
t + '-debug.apk')
- for t in _TEST_SUITES]
+ for t in test_suites]
else:
suites = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES]
return suites
@@ -199,16 +199,8 @@ def RunTests(device, test_suite, gtest_filter, test_arguments, rebaseline,
global _TEST_SUITES
# If not specified, assume the test suites are in out/Release
- test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR,
+ test_suite_dir = os.path.abspath(os.path.join(constants.CHROME_DIR,
'out', 'Release'))
bulach 2012/07/11 09:04:22 nit: while at it, please align the 'out' with the
- if apk:
- # out/Release/$SUITE_apk/$SUITE-debug.apk
- test_suite = os.path.join(test_suite_dir,
- test_suite + '_apk',
- test_suite + '-debug.apk')
- else:
- test_suite = os.path.join(test_suite_dir, test_suite)
-
if (not os.path.exists(test_suite)):
logging.critical('Unrecognized test suite %s, supported: %s' %
(test_suite, _TEST_SUITES))
@@ -221,7 +213,7 @@ def RunTests(device, test_suite, gtest_filter, test_arguments, rebaseline,
else:
logging.critical('Unrecognized test suite, supported: %s' %
_TEST_SUITES)
- return TestResults.FromOkAndFailed([], [BaseTestResult(test_suite, '')],
+ return TestResults.FromRun([], [BaseTestResult(test_suite, '')],
False, False)
fully_qualified_test_suites = [test_suite]
else:
@@ -414,7 +406,8 @@ def Dispatch(options):
xvfb.Start()
if options.test_suite:
- all_test_suites = [options.test_suite]
+ all_test_suites = FullyQualifiedTestSuites(options.apk,
+ [options.test_suite])
else:
all_test_suites = FullyQualifiedTestSuites(options.apk)
failures = 0
« 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