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}
diff --git a/audio/test/low_bandwidth_audio_test.py b/audio/test/low_bandwidth_audio_test.py
index b81a047..add4f2f 100755
--- a/audio/test/low_bandwidth_audio_test.py
+++ b/audio/test/low_bandwidth_audio_test.py
@@ -57,12 +57,12 @@
   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 @@
     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()
 
 
diff --git a/examples/androidtests/video_quality_loopback_test.py b/examples/androidtests/video_quality_loopback_test.py
index a74acf1..19dd37c 100755
--- a/examples/androidtests/video_quality_loopback_test.py
+++ b/examples/androidtests/video_quality_loopback_test.py
@@ -88,13 +88,12 @@
                       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 @@
 
     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())