Make Python-based performance tests output an empty result output.json

TBR: phoglund@webrtc.org
Bug: webrtc:9767
Change-Id: I2e51e33ae2fd13a1e09f641dd4f2819f5901b15b
Reviewed-on: https://webrtc-review.googlesource.com/101360
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24784}
This commit is contained in:
Oleh Prypin
2018-09-21 17:16:06 +02:00
committed by Commit Bot
parent 135aad0048
commit 637b0b5d38
2 changed files with 14 additions and 7 deletions

View File

@ -57,12 +57,12 @@ def _ParseArgs():
parser.add_argument('--adb-path', help='Path to adb binary.', default='adb')
parser.add_argument('--num-retries', default='0',
help='Number of times to retry the test on Android.')
parser.add_argument('--isolated-script-test-perf-output',
help='Where to store perf results in chartjson format.', default=None)
parser.add_argument('--isolated-script-test-perf-output', default=None,
help='Path to store perf results in chartjson format.')
parser.add_argument('--isolated-script-test-output', default=None,
help='Path to output an empty JSON file which Chromium infra requires.')
# Ignore Chromium-specific flags
parser.add_argument('--isolated-script-test-output',
type=str, default=None)
parser.add_argument('--test-launcher-summary-output',
type=str, default=None)
args = parser.parse_args()
@ -274,6 +274,10 @@ def main():
with open(args.isolated_script_test_perf_output, 'w') as f:
json.dump({"format_version": "1.0", "charts": charts}, f)
if args.isolated_script_test_output:
with open(args.isolated_script_test_output, 'w') as f:
json.dump({"version": 3}, f)
return test_process.wait()

View File

@ -88,13 +88,12 @@ def _ParseArgs():
help='Number of times to retry the test on Android.')
parser.add_argument('--isolated-script-test-perf-output',
help='Where to store perf results in chartjson format.', default=None)
parser.add_argument('--isolated-script-test-output', default=None,
help='Path to output an empty JSON file which Chromium infra requires.')
args, unknown_args = parser.parse_known_args()
# Ignore Chromium-specific flags
parser = argparse.ArgumentParser()
parser.add_argument('--isolated-script-test-output',
type=str, default=None)
parser.add_argument('--test-launcher-summary-output',
type=str, default=None)
@ -236,6 +235,10 @@ def main():
utils.RemoveDirectory(temp_dir)
if args.isolated_script_test_output:
with open(args.isolated_script_test_output, 'w') as f:
f.write('{"version": 3}')
if __name__ == '__main__':
sys.exit(main())