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

Unified Diff: content/test/gpu/run_gpu_integration_test.py

Issue 2062993003: Add wrapper script for GPU integration tests, supporting sharding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « chrome/test/BUILD.gn ('k') | testing/scripts/run_gpu_integration_test_as_googletest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/gpu/run_gpu_integration_test.py
diff --git a/content/test/gpu/run_gpu_integration_test.py b/content/test/gpu/run_gpu_integration_test.py
index c92bc06f6ad94e99d30dc61eac54cdb3c776606d..4d5908e9f00dd5754ead9b8dc6943c267a5831ce 100755
--- a/content/test/gpu/run_gpu_integration_test.py
+++ b/content/test/gpu/run_gpu_integration_test.py
@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import argparse
import json
import sys
@@ -13,8 +14,6 @@ path_util.SetupTelemetryPaths()
from telemetry.testing import browser_test_runner
-abbr_json_arg = '--write-abbreviated-json-results-to='
-
def PostprocessJSON(file_name):
def TrimPrefix(s):
return s[1 + s.rfind('.'):]
@@ -33,10 +32,14 @@ def main():
# Postprocess the outputted JSON to trim all of the prefixes from
# the test names, to keep them as similar to the old form as
# possible -- and keep them from getting crazily long.
- for arg in rest_args:
- if arg.startswith(abbr_json_arg):
- PostprocessJSON(arg[len(abbr_json_arg):])
- break
+ parser = argparse.ArgumentParser(description='Temporary argument parser')
Ken Russell (switch to Gerrit) 2016/06/14 00:42:29 This is more robust than scraping the arguments ma
+ parser.add_argument(
+ '--write-abbreviated-json-results-to', metavar='FILENAME',
+ action='store',
+ help=('Full path for json results'))
+ option, _ = parser.parse_known_args(rest_args)
+ if option.write_abbreviated_json_results_to:
+ PostprocessJSON(option.write_abbreviated_json_results_to)
if __name__ == '__main__':
sys.exit(main())
« no previous file with comments | « chrome/test/BUILD.gn ('k') | testing/scripts/run_gpu_integration_test_as_googletest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698