Chromium Code Reviews| Index: build/android/test_runner.py |
| diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
| index b22607fa4c1b34fc3e94f4bf6fd5755ea12baac1..c02c4466da1f72df8ab35eca5963799f201930ec 100755 |
| --- a/build/android/test_runner.py |
| +++ b/build/android/test_runner.py |
| @@ -420,7 +420,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=os.path.abspath, |
|
shenghuazhang
2017/07/25 20:44:45
Type realpath changes value "//home/..." to "/home
jbudorick
2017/07/25 21:07:46
I think you're on the right track here, but you ca
shenghuazhang
2017/07/25 21:28:10
Thanks for this suggestion! This should be much mo
|
| help='The relative path to a file containing JSON list of shared ' |
| 'preference files to edit and how to do so. Example list: ' |
| '[{' |
| @@ -967,6 +967,13 @@ def main(): |
| parser.error('--replace-system-package and --enable-concurrent-adb cannot ' |
| 'be used together') |
| + if hasattr(args, 'shared_prefs_file') and args.shared_prefs_file: |
| + if args.shared_prefs_file.startswith('//'): |
| + args.shared_prefs_file = os.path.abspath( |
| + os.path.join(host_paths.DIR_SOURCE_ROOT, |
| + args.shared_prefs_file[2:].replace('/', os.sep))) |
| + args.shared_prefs_file = os.path.realpath(args.shared_prefs_file) |
| + |
| try: |
| return RunTestsCommand(args) |
| except base_error.BaseError as e: |