| Index: testing/scripts/run_telemetry_benchmark_as_googletest.py
|
| diff --git a/testing/scripts/run_telemetry_benchmark_as_googletest.py b/testing/scripts/run_telemetry_benchmark_as_googletest.py
|
| index cadb30bdad80ebb1895e4e1a75ffd1476137f8cc..a1343b37190abdd2a1e70a24f6296971f1d60614 100755
|
| --- a/testing/scripts/run_telemetry_benchmark_as_googletest.py
|
| +++ b/testing/scripts/run_telemetry_benchmark_as_googletest.py
|
| @@ -66,6 +66,8 @@ def main():
|
| failures = []
|
| chartjson_results_present = '--output-format=chartjson' in rest_args
|
| chartresults = None
|
| + json_test_results_present = '--output-format=json-test-results' in rest_args
|
| + json_test_results = None
|
|
|
| results = None
|
| try:
|
| @@ -97,6 +99,11 @@ def main():
|
| failures.append(name)
|
| valid = bool(rc == 0 or failures)
|
|
|
| + if json_test_results_present:
|
| + tempfile_name = os.path.join(tempfile_dir, 'test-results.json')
|
| + with open(tempfile_name) as f:
|
| + json_test_results = json.load(f)
|
| +
|
| except Exception:
|
| traceback.print_exc()
|
| if results:
|
| @@ -116,10 +123,13 @@ def main():
|
| open(args.isolated_script_test_chartjson_output, 'w')
|
| json.dump(chartresults, chartjson_output_file)
|
|
|
| - json.dump({
|
| - 'valid': valid,
|
| - 'failures': failures
|
| - }, args.isolated_script_test_output)
|
| + if not json_test_results_present:
|
| + json_test_results = {
|
| + 'valid': valid,
|
| + 'failures': failures
|
| + }
|
| +
|
| + json.dump(json_test_results, args.isolated_script_test_output)
|
| return rc
|
|
|
| finally:
|
|
|