Allow location of test_runner.py to be overriden in GYP

Required for webrtc

BUG=599919

Review URL: https://codereview.chromium.org/1868723002

Cr-Original-Commit-Position: refs/heads/master@{#385563}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a490637d06294d400b0e6496642fc2fbcc974538
This commit is contained in:
agrieve 2016-04-06 15:08:53 -07:00 коммит произвёл Commit bot
Родитель a7cfb8b7b8
Коммит fa8f205cc8
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -50,6 +50,8 @@ def main(args):
parser.add_argument('--depfile',
help='Path to the depfile. This must be specified as '
"the action's first output.")
parser.add_argument('--test-runner-path',
help='Path to test_runner.py (optional).')
# We need to intercept any test runner path arguments and make all
# of the paths relative to the output script directory.
group = parser.add_argument_group('Test runner path arguments.')
@ -70,7 +72,7 @@ def main(args):
"""Returns the path relative to the output script directory."""
return os.path.relpath(path, os.path.dirname(args.script_output_path))
test_runner_path = os.path.join(
test_runner_path = args.test_runner_path or os.path.join(
os.path.dirname(__file__), os.path.pardir, 'test_runner.py')
test_runner_path = RelativizePathToScript(test_runner_path)

Просмотреть файл

@ -43,6 +43,7 @@
'variables': {
'additional_apks%': [],
'isolate_file%': '',
'test_runner_path%': '',
},
'test_runner_args': ['--output-directory', '<(PRODUCT_DIR)'],
'conditions': [
@ -74,6 +75,9 @@
['isolate_file != ""', {
'test_runner_args': ['--isolate-file-path', '<(isolate_file)']
}],
['test_runner_path != ""', {
'test_runner_args': ['--test-runner-path', '<(test_runner_path)']
}],
],
},
'actions': [