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

Side by Side Diff: scripts/slave/runtest.py

Issue 2346963003: Updating perf recipe for disabled chartjson data. (Closed)
Patch Set: responding to review comments 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 unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/unittests/results_dashboard_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A tool used to run a Chrome test executable and process the output. 6 """A tool used to run a Chrome test executable and process the output.
7 7
8 This script is used by the buildbot slaves. It must be run from the outer 8 This script is used by the buildbot slaves. It must be run from the outer
9 build directory, e.g. chrome-release/build/. 9 build directory, e.g. chrome-release/build/.
10 10
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 670
671 Args: 671 Args:
672 chartjson_file: Path to the file to write the chartjson. 672 chartjson_file: Path to the file to write the chartjson.
673 log_processor: An instance of a log processor class, which has been used to 673 log_processor: An instance of a log processor class, which has been used to
674 process the test output, so it contains the test results. 674 process the test output, so it contains the test results.
675 args: Dict of additional args to send to results_dashboard. 675 args: Dict of additional args to send to results_dashboard.
676 """ 676 """
677 assert log_processor.IsChartJson() 677 assert log_processor.IsChartJson()
678 678
679 chartjson_data = _GenerateDashboardJson(log_processor, args) 679 chartjson_data = _GenerateDashboardJson(log_processor, args)
680 680 if chartjson_data:
681 with open(chartjson_file, 'w') as f: 681 with open(chartjson_file, 'w') as f:
682 json.dump(chartjson_data, f) 682 json.dump(chartjson_data, f)
683 683
684 684
685 def _SendResultsToDashboard(log_processor, args): 685 def _SendResultsToDashboard(log_processor, args):
686 """Sends results from a log processor instance to the dashboard. 686 """Sends results from a log processor instance to the dashboard.
687 687
688 Args: 688 Args:
689 log_processor: An instance of a log processor class, which has been used to 689 log_processor: An instance of a log processor class, which has been used to
690 process the test output, so it contains the test results. 690 process the test output, so it contains the test results.
691 args: Dict of additional args to send to results_dashboard. 691 args: Dict of additional args to send to results_dashboard.
692 692
693 Returns: 693 Returns:
694 True if no errors occurred. 694 True if no errors occurred.
695 """ 695 """
696 if args['system'] is None: 696 if args['system'] is None:
697 # perf_id not specified in factory properties. 697 # perf_id not specified in factory properties.
698 print 'Error: No system name (perf_id) specified when sending to dashboard.' 698 print 'Error: No system name (perf_id) specified when sending to dashboard.'
699 return True 699 return True
700 700
701 results = None 701 results = None
702 if log_processor.IsChartJson(): 702 if log_processor.IsChartJson():
703 results = _GenerateDashboardJson(log_processor, args) 703 results = _GenerateDashboardJson(log_processor, args)
704 if not results: 704 if not results:
705 print 'Error: No json output from telemetry.' 705 print 'Error: No json output from telemetry.'
706 print '@@@STEP_FAILURE@@@' 706 print '@@@STEP_FAILURE@@@'
707 log_processor.Cleanup() 707 log_processor.Cleanup()
708 if results and not results['chart_data'].get('enabled', True):
709 return True # A successful run, but the benchmark was disabled.
708 else: 710 else:
709 charts = _GetDataFromLogProcessor(log_processor) 711 charts = _GetDataFromLogProcessor(log_processor)
710 results = results_dashboard.MakeListOfPoints( 712 results = results_dashboard.MakeListOfPoints(
711 charts, args['system'], args['test'], args['buildername'], 713 charts, args['system'], args['test'], args['buildername'],
712 args['buildnumber'], args['supplemental_columns']) 714 args['buildnumber'], args['supplemental_columns'])
713 715
714 if not results: 716 if not results:
715 return False 717 return False
716 718
717 logging.debug(json.dumps(results, indent=2)) 719 logging.debug(json.dumps(results, indent=2))
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 finally: 1909 finally:
1908 if did_launch_dbus: 1910 if did_launch_dbus:
1909 # It looks like the command line argument --exit-with-session 1911 # It looks like the command line argument --exit-with-session
1910 # isn't working to clean up the spawned dbus-daemon. Kill it 1912 # isn't working to clean up the spawned dbus-daemon. Kill it
1911 # manually. 1913 # manually.
1912 _ShutdownDBus() 1914 _ShutdownDBus()
1913 1915
1914 1916
1915 if '__main__' == __name__: 1917 if '__main__' == __name__:
1916 sys.exit(main()) 1918 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/unittests/results_dashboard_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698