Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: testing/scripts/run_telemetry_as_googletest.py

Issue 2403913002: [testing/script] Switch run_telemetry_as_googletest.py to produce full json results format (Closed)
Patch Set: Update flag type Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/scripts/run_telemetry_as_googletest.py
diff --git a/testing/scripts/run_telemetry_as_googletest.py b/testing/scripts/run_telemetry_as_googletest.py
index 82491845dc6273f5cfd88b806b7eccb104583fae..db489b8156a224a02f9b9203c70fde80dbf8f33b 100755
--- a/testing/scripts/run_telemetry_as_googletest.py
+++ b/testing/scripts/run_telemetry_as_googletest.py
@@ -35,7 +35,7 @@ import xvfb
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
- '--isolated-script-test-output', type=argparse.FileType('w'),
+ '--isolated-script-test-output', type=str,
required=True)
parser.add_argument('--xvfb', help='Start xvfb.', action='store_true')
args, rest_args = parser.parse_known_args()
@@ -72,23 +72,8 @@ def main():
'--shard-index=%d' % shard_index
]
try:
- with common.temporary_file() as tempfile_path:
- rc = common.run_command([sys.executable] + rest_args + sharding_args + [
- '--write-full-results-to', tempfile_path,
- ], env=env)
- with open(tempfile_path) as f:
- results = json.load(f)
- parsed_results = common.parse_common_test_results(results,
- test_separator='.')
- failures = parsed_results['unexpected_failures']
-
- json.dump({
- 'valid': bool(rc <= common.MAX_FAILURES_EXIT_STATUS and
- ((rc == 0) or failures)),
- 'failures': failures.keys(),
- }, args.isolated_script_test_output)
-
- return rc
+ return common.run_command([sys.executable] + rest_args + sharding_args + [
+ '--write-full-results-to', args.isolated_script_test_output], env=env)
finally:
xvfb.kill(xvfb_proc)
xvfb.kill(openbox_proc)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698