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

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

Issue 2668203005: Reland allow JUnit3/4 tests within the same apk to be run by test_runner (Closed)
Patch Set: Change pickle version Created 3 years, 11 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/local/device/local_device_instrumentation_test_run.py
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
index 645b1282ae8932d4522ddf4d1b995882502afbbb..2201657559eaaf89bf276a4e5afcc9eaeeb0e5c2 100644
--- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
+++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -204,6 +204,8 @@ class LocalDeviceInstrumentationTestRun(
if not self._test_instance.driver_apk:
raise Exception('driver_apk does not exist. '
'Please build it and try again.')
+ if any(t.get('is_junit4') for t in test):
+ raise Exception('driver apk does not support JUnit4 tests')
def name_and_timeout(t):
n = instrumentation_test_instance.GetTestName(t)
@@ -224,8 +226,13 @@ class LocalDeviceInstrumentationTestRun(
else:
test_name = instrumentation_test_instance.GetTestName(test)
test_display_name = self._GetUniqueTestName(test)
- target = '%s/%s' % (
- self._test_instance.test_package, self._test_instance.test_runner)
+ if test['is_junit4']:
+ target = '%s/%s' % (
+ self._test_instance.test_package,
+ self._test_instance.test_runner_junit4)
+ else:
+ target = '%s/%s' % (
+ self._test_instance.test_package, self._test_instance.test_runner)
extras['class'] = test_name
if 'flags' in test:
flags = test['flags']
« no previous file with comments | « build/android/pylib/instrumentation/instrumentation_test_instance_test.py ('k') | build/android/pylib/utils/dexdump.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698