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

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

Issue 2963683002: Simplify CommandLine parameterizing J3 Instrumentation Tests (Closed)
Patch Set: remove unnecessary changes in host script Created 3 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
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 03656808ac5526b721c98a07dcbaaad76369e684..a6069ff12bd4ce02d515beeb051f0de5f61d5eef 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
@@ -319,7 +319,6 @@ class LocalDeviceInstrumentationTestRun(
extras = {}
flags_to_add = []
- flags_to_remove = []
test_timeout_scale = None
if self._test_instance.coverage_directory:
coverage_basename = '%s.ec' % ('%s_group' % test[0]['method']
@@ -375,9 +374,8 @@ class LocalDeviceInstrumentationTestRun(
target = '%s/%s' % (
self._test_instance.test_package, self._test_instance.test_runner)
extras['class'] = test_name
- if 'flags' in test:
- flags_to_add.extend(test['flags'].add)
- flags_to_remove.extend(test['flags'].remove)
+ if 'flags' in test and test['flags']:
+ flags_to_add.extend(test['flags'])
timeout = self._GetTimeoutFromAnnotations(
test['annotations'], test_display_name)
@@ -398,10 +396,9 @@ class LocalDeviceInstrumentationTestRun(
flags_to_add.append('--render-test-output-dir=%s' %
render_tests_device_output_dir)
- if flags_to_add or flags_to_remove:
+ if flags_to_add:
self._CreateFlagChangerIfNeeded(device)
- self._flag_changers[str(device)].PushFlags(
- add=flags_to_add, remove=flags_to_remove)
+ self._flag_changers[str(device)].PushFlags(add=flags_to_add)
time_ms = lambda: int(time.time() * 1e3)
start_ms = time_ms()
@@ -424,7 +421,7 @@ class LocalDeviceInstrumentationTestRun(
logcat_url = logmon.GetLogcatURL()
duration_ms = time_ms() - start_ms
- if flags_to_add or flags_to_remove:
+ if flags_to_add:
self._flag_changers[str(device)].Restore()
if test_timeout_scale:
valgrind_tools.SetChromeTimeoutScale(
@@ -452,7 +449,7 @@ class LocalDeviceInstrumentationTestRun(
recursive=True, force=True)
# Update the result name if the test used flags.
- if flags_to_add or flags_to_remove:
+ if flags_to_add:
for r in results:
if r.GetName() == test_name:
r.SetName(test_display_name)

Powered by Google App Engine
This is Rietveld 408576698