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

Unified Diff: build/android/pylib/results/presentation/test_results_presentation.py

Issue 2947603002: Merge test results presentation of multiple shards. (Closed)
Patch Set: address john's comments Created 3 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
Index: build/android/pylib/results/presentation/test_results_presentation.py
diff --git a/build/android/pylib/results/presentation/test_results_presentation.py b/build/android/pylib/results/presentation/test_results_presentation.py
index 659917382271049244f37efaa9877d7fd7ffefd6..05250a43d2f506addcc6ce84083608a4037392ac 100755
--- a/build/android/pylib/results/presentation/test_results_presentation.py
+++ b/build/android/pylib/results/presentation/test_results_presentation.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/env python
#
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -12,12 +12,14 @@ import os
import sys
import urllib
+
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.abspath(os.path.join(
CURRENT_DIR, '..', '..', '..', '..', '..'))
sys.path.append(os.path.join(BASE_DIR, 'build', 'android'))
from pylib.utils import google_storage_helper # pylint: disable=import-error
+from pylib.results.presentation import standard_gtest_merge
jbudorick 2017/06/21 21:05:06 nit: this should precede the google_storage_helper
BigBossZhiling 2017/06/21 22:10:24 Done.
sys.path.append(os.path.join(BASE_DIR, 'third_party'))
import jinja2 # pylint: disable=import-error
@@ -401,8 +403,15 @@ def main():
if args.positional:
if not len(args.positional) == 1:
jbudorick 2017/06/21 21:05:05 nit: flip this conditional around to if len(arg
BigBossZhiling 2017/06/21 22:10:25 Done.
- raise parser.error('More than 1 json file specified.')
- json_file = args.positional[0]
+ if args.output_json and args.summary_json:
+ standard_gtest_merge.standard_gtest_merge(
+ args.output_json, args.summary_json, args.positional)
+ json_file = args.output_json
+ else:
+ raise Exception('Arguments (output_json/summary_json) of'
jbudorick 2017/06/21 21:05:05 This was not what I meant. If args.output_json is
BigBossZhiling 2017/06/21 22:10:25 Done.
+ ' merge API are missing. ')
+ else:
+ json_file = args.positional[0]
elif args.json_file:
json_file = args.json_file

Powered by Google App Engine
This is Rietveld 408576698