| 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']
|
|
|