diff options
author | Caroline Tice <cmtice@google.com> | 2017-04-06 17:16:05 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-08 19:40:20 -0700 |
commit | f6ef4395fe1896ba68c80e52cb24763b0fcfe7f8 (patch) | |
tree | 7612123711db98f0746e56b66368d16b388192bd /generate-waterfall-reports.py | |
parent | 8c18be1425c8a4ecfc059a7c637fc93f33edab1f (diff) | |
download | toolchain-utils-f6ef4395fe1896ba68c80e52cb24763b0fcfe7f8.tar.gz |
[toolchain-utils] Fix remaining lint errors in toolchain-utils.
In addition to fixing the lint errors, this also fixes the Python
formatting issues (ran tc_pyformat on nearly all the files).
BUG=chromium:570450
TEST=Ran all crosperf & bisect tool unit tests.
Ran afe_lock_machine.py (check machine status)
Ran full crosperf test (octane, speedometer, BootPerf) on alex.
Change-Id: Ic86f9192801ac67769f3de30f1c5f0d203ce0831
Reviewed-on: https://chromium-review.googlesource.com/471886
Commit-Ready: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'generate-waterfall-reports.py')
-rwxr-xr-x | generate-waterfall-reports.py | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/generate-waterfall-reports.py b/generate-waterfall-reports.py index ed8e3696..9fbb5637 100755 --- a/generate-waterfall-reports.py +++ b/generate-waterfall-reports.py @@ -32,13 +32,10 @@ import time from cros_utils import command_executer # All the test suites whose data we might want for the reports. -TESTS = ( - ('bvt-inline', 'HWTest'), - ('bvt-cq', 'HWTest'), - ('toolchain-tests', 'HWTest'), - ('security', 'HWTest'), - ('kernel_daily_regression', 'HWTest'), - ('kernel_daily_benchmarks', 'HWTest'),) +TESTS = (('bvt-inline', 'HWTest'), ('bvt-cq', 'HWTest'), + ('toolchain-tests', 'HWTest'), ('security', 'HWTest'), + ('kernel_daily_regression', 'HWTest'), ('kernel_daily_benchmarks', + 'HWTest'),) # The main waterfall builders, IN THE ORDER IN WHICH WE WANT THEM # LISTED IN THE REPORT. @@ -127,8 +124,8 @@ def PruneOldFailures(failure_dict, int_date): def GetBuildID(build_bot, date): """Get the build id for a build_bot at a given date.""" - day = '{day:02d}'.format(day=date%100) - mon = MONTHS[date/100%100] + day = '{day:02d}'.format(day=date % 100) + mon = MONTHS[date / 100 % 100] date_string = mon + ' ' + day if build_bot in WATERFALL_BUILDERS: url = 'https://uberchromegw.corp.google.com/i/chromeos/' + \ @@ -136,7 +133,7 @@ def GetBuildID(build_bot, date): if build_bot in ROTATING_BUILDERS: url = 'https://uberchromegw.corp.google.com/i/chromiumos.tryserver/' + \ 'builders/%s?numbuilds=200' % build_bot - command = 'sso_client %s' %url + command = 'sso_client %s' % url retval = 1 retry_time = 3 while retval and retry_time: @@ -275,15 +272,14 @@ def GenerateWaterfallReport(report_dict, fail_dict, waterfall_type, date, ' %6s %6s %6s %6s\n' % (inline_color, cq_color, toolchain_color, security_color, regression_color, bench_color)) - out_file.write('%25s %3s %s %s %s %s %s %s\n' % (builder, status, - inline, cq, - toolchain, security, - regression, bench)) + out_file.write('%25s %3s %s %s %s %s %s %s\n' % + (builder, status, inline, cq, toolchain, security, + regression, bench)) else: out_file.write(' %6s %6s' - ' %6s %6s\n' % (inline_color, cq_color, - toolchain_color, - security_color)) + ' %6s %6s\n' % + (inline_color, cq_color, toolchain_color, + security_color)) out_file.write('%25s %3s %s %s %s %s\n' % (builder, status, inline, cq, toolchain, security)) else: @@ -372,8 +368,9 @@ def UpdateReport(report_dict, builder, test, report_date, build_link, build_dict['date'] = report_date if 'board' in build_dict and build_dict['board'] != board: - raise RuntimeError('Error: Two different boards (%s,%s) in one build (%s)!' - % (board, build_dict['board'], build_link)) + raise RuntimeError( + 'Error: Two different boards (%s,%s) in one build (%s)!' % + (board, build_dict['board'], build_link)) build_dict['board'] = board color_key = '%s-color' % test @@ -819,9 +816,8 @@ def Main(argv): EmailReport(main_report, 'Main', format_date(int_date)) shutil.copy(main_report, ARCHIVE_DIR) if rotating_report_dict and not main_only and not failures_report: - rotating_report = GenerateWaterfallReport(rotating_report_dict, - failure_dict, 'rotating', - int_date, omit_failures) + rotating_report = GenerateWaterfallReport( + rotating_report_dict, failure_dict, 'rotating', int_date, omit_failures) EmailReport(rotating_report, 'Rotating', format_date(int_date)) shutil.copy(rotating_report, ARCHIVE_DIR) |