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

Unified Diff: build/android/test_runner.py

Issue 2985013002: [test_runner] support relative paths on argument --shared-prefs-file (Closed)
Patch Set: rebase 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
« 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/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index b22607fa4c1b34fc3e94f4bf6fd5755ea12baac1..b392ba649d7e977ab408cfd23edf6bd13611c4f4 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -50,6 +50,13 @@ _DEVIL_STATIC_CONFIG_FILE = os.path.abspath(os.path.join(
host_paths.DIR_SOURCE_ROOT, 'build', 'android', 'devil_config.json'))
+def _RealPath(arg):
+ if arg.startswith('//'):
+ arg = os.path.abspath(os.path.join(host_paths.DIR_SOURCE_ROOT,
+ arg[2:].replace('/', os.sep)))
+ return os.path.realpath(arg)
+
+
def AddTestLauncherOptions(parser):
"""Adds arguments mirroring //base/test/launcher.
@@ -420,7 +427,7 @@ def AddInstrumentationTestOptions(parser):
help='Capture screenshots of test failures')
parser.add_argument(
'--shared-prefs-file',
- dest='shared_prefs_file', type=os.path.realpath,
+ dest='shared_prefs_file', type=_RealPath,
help='The relative path to a file containing JSON list of shared '
'preference files to edit and how to do so. Example list: '
'[{'
« 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