Chromium Code Reviews| Index: scripts/slave/runtest.py |
| diff --git a/scripts/slave/runtest.py b/scripts/slave/runtest.py |
| index d169d54102b728f4f53cb825d8ff8822875754b1..23421ac64f93257581bb045f0431c52107a9ddc1 100755 |
| --- a/scripts/slave/runtest.py |
| +++ b/scripts/slave/runtest.py |
| @@ -54,6 +54,7 @@ from slave import gtest_slave_utils |
| from slave import process_log_utils |
| from slave import results_dashboard |
| from slave import slave_utils |
| +from slave import telemetry_utils |
| from slave import xvfb |
| USAGE = '%s [options] test.exe [test args]' % os.path.basename(sys.argv[0]) |
| @@ -553,11 +554,12 @@ def _ListParsers(selection): |
| return shouldlist |
| -def _SelectResultsTracker(options): |
| +def _SelectResultsTracker(options, test_exe): |
| """Returns a log parser class (aka results tracker class). |
| Args: |
| options: Command-line options (from OptionParser). |
| + test_exe: Name of the test to execute |
| Returns: |
| A log parser class (aka results tracker class), or None. |
| @@ -565,6 +567,9 @@ def _SelectResultsTracker(options): |
| if _UsingGtestJson(options): |
| return gtest_utils.GTestJSONParser |
| + if test_exe and test_exe.endswith('telemetry.py'): |
| + return telemetry_utils.TelemetryLogParser |
|
sullivan
2014/09/05 04:30:00
Is this the best way to tell if it's a telemetry t
ghost stip (do not use)
2014/09/05 21:39:06
Unfortunately yeah, if you want skip a master rest
|
| + |
| parsers = _GetParsers() |
| if options.annotate: |
| if options.annotate in parsers: |
| @@ -602,7 +607,7 @@ def _CreateResultsTracker(tracker_class, options): |
| if not tracker_class: |
| return None |
| - if tracker_class.__name__ in ('GTestLogParser',): |
| + if tracker_class.__name__ in ('GTestLogParser', 'TelemetryLogParser'): |
| tracker_obj = tracker_class() |
| elif tracker_class.__name__ in ('GTestJSONParser',): |
| tracker_obj = tracker_class(options.build_properties.get('mastername')) |
| @@ -690,11 +695,17 @@ def _SendResultsToDashboard(results_tracker, system, test, url, build_dir, |
| if extra_columns: |
| supplemental_columns.update(extra_columns) |
| - charts = _GetDataFromLogProcessor(results_tracker) |
| - points = results_dashboard.MakeListOfPoints( |
| - charts, system, test, mastername, buildername, buildnumber, |
| - supplemental_columns) |
| - results_dashboard.SendResults(points, url, build_dir) |
| + if results_tracker.IsChartJson(): |
| + results_dashboard.SendChartJsonResults( |
|
sullivan
2014/09/05 04:30:00
Still working on implementing this.
sullivan
2014/09/05 21:32:16
This is implemented now.
|
| + results_tracker.Chart(), results_tracker.RefChart(), |
| + system, test, mastername, buildername, buildnumber, supplemental_columns |
| + ) |
| + else: |
| + charts = _GetDataFromLogProcessor(results_tracker) |
| + points = results_dashboard.MakeListOfPoints( |
| + charts, system, test, mastername, buildername, buildnumber, |
| + supplemental_columns) |
| + results_dashboard.SendResults(points, url, build_dir) |
| def _GetDataFromLogProcessor(log_processor): |
| @@ -962,7 +973,7 @@ def _MainParse(options, _args): |
| if _ListParsers(options.annotate): |
| return 0 |
| - tracker_class = _SelectResultsTracker(options) |
| + tracker_class = _SelectResultsTracker(options, None) |
|
sullivan
2014/09/05 04:30:00
This should never get called for Telemetry tests,
ghost stip (do not use)
2014/09/05 21:39:06
Right, there is no binary here
|
| results_tracker = _CreateResultsTracker(tracker_class, options) |
| if options.generate_json_file: |
| @@ -1029,7 +1040,7 @@ def _MainMac(options, args, extra_env): |
| # If --annotate=list was passed, list the log parser classes and exit. |
| if _ListParsers(options.annotate): |
| return 0 |
| - tracker_class = _SelectResultsTracker(options) |
| + tracker_class = _SelectResultsTracker(options, test_exe) |
| results_tracker = _CreateResultsTracker(tracker_class, options) |
| if options.generate_json_file: |
| @@ -1282,7 +1293,7 @@ def _MainLinux(options, args, extra_env): |
| # If --annotate=list was passed, list the log parser classes and exit. |
| if _ListParsers(options.annotate): |
| return 0 |
| - tracker_class = _SelectResultsTracker(options) |
| + tracker_class = _SelectResultsTracker(options, test_exe) |
| results_tracker = _CreateResultsTracker(tracker_class, options) |
| if options.generate_json_file: |
| @@ -1431,7 +1442,7 @@ def _MainWin(options, args, extra_env): |
| # If --annotate=list was passed, list the log parser classes and exit. |
| if _ListParsers(options.annotate): |
| return 0 |
| - tracker_class = _SelectResultsTracker(options) |
| + tracker_class = _SelectResultsTracker(options, test_exe) |
| results_tracker = _CreateResultsTracker(tracker_class, options) |
| if options.generate_json_file: |
| @@ -1512,7 +1523,7 @@ def _MainAndroid(options, args, extra_env): |
| if _ListParsers(options.annotate): |
| return 0 |
| - tracker_class = _SelectResultsTracker(options) |
| + tracker_class = _SelectResultsTracker(options, None) |
| results_tracker = _CreateResultsTracker(tracker_class, options) |
| if options.generate_json_file: |