Chromium Code Reviews| Index: scripts/slave/runtest.py |
| diff --git a/scripts/slave/runtest.py b/scripts/slave/runtest.py |
| index 60b250c5f700c1579fa1f36e803956e5eaf6f41a..7b2e58ecdc127e827d4fde2d4129df6b61f04b46 100755 |
| --- a/scripts/slave/runtest.py |
| +++ b/scripts/slave/runtest.py |
| @@ -42,6 +42,7 @@ import config |
| from slave import crash_utils |
| 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 xvfb |
| from slave.gtest.json_results_generator import GetSvnRevision |
| @@ -346,6 +347,12 @@ def create_results_tracker(tracker_class, options): |
| return tracker_obj |
| +def send_results_to_dashboard(results_tracker, master, system, test, url): |
| + for logname, log in results_tracker.PerformanceLogs().iteritems(): |
| + lines = [str(l).rstrip() for l in log] |
| + results_dashboard.SendResults(logname, lines, master, system, test, url) |
| + |
| + |
| def annotate(test_name, result, results_tracker, full_name=False, |
| perf_dashboard_id=None): |
| """Given a test result and tracker, update the waterfall with test results.""" |
| @@ -544,6 +551,12 @@ def main_mac(options, args): |
| perf_dashboard_id=options.factory_properties.get( |
| 'test_name')) |
| + if options.results_url: |
| + send_results_to_dashboard( |
| + results_tracker, options.factory_properties.get('master'), |
|
Mike Stip (use stip instead)
2013/02/23 00:23:21
nit: I'd prefer masterName or master_name
sullivan
2013/02/25 22:18:29
Done.
|
| + options.factory_properties.get('perf_id'), options.test_type, |
| + options.results_url) |
| + |
| return result |
| @@ -790,6 +803,12 @@ def main_linux(options, args): |
| perf_dashboard_id=options.factory_properties.get( |
| 'test_name')) |
| + if options.results_url: |
| + send_results_to_dashboard( |
| + results_tracker, options.factory_properties.get('master'), |
| + options.factory_properties.get('perf_id'), options.test_type, |
| + options.results_url) |
| + |
| return result |
| @@ -864,6 +883,12 @@ def main_win(options, args): |
| perf_dashboard_id=options.factory_properties.get( |
| 'test_name')) |
| + if options.results_url: |
| + send_results_to_dashboard( |
| + results_tracker, options.factory_properties.get('master'), |
| + options.factory_properties.get('perf_id'), options.test_type, |
| + options.results_url) |
| + |
| return result |
| @@ -965,6 +990,9 @@ def main(): |
| help='Annotate output when run as a buildstep. ' |
| 'Specify which type of test to parse, available' |
| ' types listed with --annotate=list.') |
| + option_parser.add_option('', '--results-url', default='', |
| + help='The URI of the perf dashboard to upload ' |
| + 'results to.') |
| chromium_utils.AddPropertiesOptions(option_parser) |
| options, args = option_parser.parse_args() |