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

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

Issue 2491373005: [Android] Fix instrumentation test filtering for parameterized tests. (Closed)
Patch Set: Created 4 years, 1 month 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 6c00b7087dc9f5c44aeabdc2ca2abe8a17c0174c..58f73858df09447b4d12abfc379500bb8f54db76 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
@@ -13,6 +13,7 @@ from devil.android import flag_changer
from devil.utils import reraiser_thread
from pylib import valgrind_tools
from pylib.base import base_test_result
+from pylib.instrumentation import instrumentation_test_instance
from pylib.local.device import local_device_environment
from pylib.local.device import local_device_test_run
import tombstones
@@ -180,21 +181,9 @@ class LocalDeviceInstrumentationTestRun(
def _GetTests(self):
return self._test_instance.GetTests()
- def _GetTestName(self, test):
- # pylint: disable=no-self-use
- return '%s#%s' % (test['class'], test['method'])
-
#override
def _GetUniqueTestName(self, test):
- display_name = self._GetTestName(test)
- if 'flags' in test:
- flags = test['flags']
- if flags.add:
- display_name = '%s with {%s}' % (display_name, ' '.join(flags.add))
- if flags.remove:
- display_name = '%s without {%s}' % (
- display_name, ' '.join(flags.remove))
- return display_name
+ return instrumentation_test_instance.GetUniqueTestName(test)
#override
def _RunTest(self, device, test):
@@ -218,7 +207,7 @@ class LocalDeviceInstrumentationTestRun(
'Please build it and try again.')
def name_and_timeout(t):
- n = self._GetTestName(t)
+ n = instrumentation_test_instance.GetTestName(t)
i = self._GetTimeoutFromAnnotations(t['annotations'], n)
return (n, i)
@@ -234,7 +223,7 @@ class LocalDeviceInstrumentationTestRun(
test_list=test_names))
timeout = sum(timeouts)
else:
- test_name = self._GetTestName(test)
+ 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)

Powered by Google App Engine
This is Rietveld 408576698