• Home
  • Raw
  • Download

Lines Matching +full:not +full:- +full:date

5 # - arguments to allow generating only the main waterfall report,
8 # - Better way of figuring out which dates/builds to generate
9 # reports for: probably an argument specifying a date or a date
13 # - Store/get the json/data files in mobiletc-prebuild's x20 area.
14 # - Update data in json file to reflect, for each testsuite, which
15 # tests are not expected to run on which boards; update this
17 # - Make sure user's prodaccess is up-to-date before trying to use
19 # - Add some nice formatting/highlighting to reports.
36 ('bvt-inline', 'HWTest'),
37 ('bvt-cq', 'HWTest'),
38 ('toolchain-tests', 'HWTest'),
46 'amd64-gcc-toolchain', 'arm-gcc-toolchain', 'arm64-gcc-toolchain',
47 'x86-gcc-toolchain', 'amd64-llvm-toolchain', 'arm-llvm-toolchain',
48 'arm64-llvm-toolchain', 'x86-llvm-toolchain', 'amd64-llvm-next-toolchain',
49 'arm-llvm-next-toolchain', 'arm64-llvm-next-toolchain',
50 'x86-llvm-next-toolchain'
53 DATA_DIR = '/google/data/rw/users/mo/mobiletc-prebuild/waterfall-report-data/'
54 ARCHIVE_DIR = '/google/data/rw/users/mo/mobiletc-prebuild/waterfall-reports/'
55 DOWNLOAD_DIR = '/tmp/waterfall-logs'
57 BUILD_DATA_FILE = '%s/build-data.txt' % DATA_DIR
62 # For int-to-string date conversion. Note, the index of the month in this
72 """Convert an integer date to a string date. YYYYMMDD -> YYYY-MMM-DD"""
84 date_str = '%d-%s-%d' % (year, month_str, day)
88 def EmailReport(report_file, report_type, date): argument
89 subject = '%s Waterfall Summary report, %s' % (report_type, date)
91 sendgmr_path = '/google/data/ro/projects/gws-sre/sendgmr'
92 command = ('%s --to=%s@google.com --subject="%s" --body_file=%s' %
98 earliest_date = int_date - MAX_SAVE_RECORDS
128 def GetBuildID(build_bot, date): argument
129 """Get the build id for a build_bot at a given date."""
130 day = '{day:02d}'.format(day=date%100)
131 mon = MONTHS[date/100%100]
146 retry_time -= 1
170 def GenerateFailuresReport(fail_dict, date): argument
171 filename = 'waterfall_report.failures.%s.txt' % date
172 date_string = format_date(date)
214 def GenerateWaterfallReport(report_dict, fail_dict, waterfall_type, date, argument
218 filename = 'waterfall_report.%s_waterfall.%s.txt' % (waterfall_type, date)
221 date_list = report_dict['date']
226 if i < num_dates - 1:
241 out_file.write(' Build bvt- bvt-cq '
242 'toolchain- security daily daily\n')
251 if builder == 'date':
254 if builder not in report_dict:
260 inline = build_dict.get('bvt-inline', '[??/ ?? /??]')
261 cq = build_dict.get('bvt-cq', '[??/ ?? /??]')
262 inline_color = build_dict.get('bvt-inline-color', '')
263 cq_color = build_dict.get('bvt-cq-color', '')
264 if 'x86' not in builder:
265 toolchain = build_dict.get('toolchain-tests', '[??/ ?? /??]')
267 toolchain_color = build_dict.get('toolchain-tests-color', '')
268 security_color = build_dict.get('security-color', '')
272 regression_color = build_dict.get('kernel_daily_regression-color', '')
273 bench_color = build_dict.get('kernel_daily_benchmarks-color', '')
348 if 'date' not in report_dict:
349 report_dict['date'] = [report_date]
350 elif report_date not in report_dict['date']:
353 report_dict['date'].append(report_date)
357 build_key = '%s-gcc-toolchain' % board
359 build_key = '%s-llvm-next-toolchain' % board
363 if build_key not in report_dict.keys():
368 if 'build_link' not in build_dict:
371 if 'date' not in build_dict:
372 build_dict['date'] = report_date
379 color_key = '%s-color' % test
388 if not test_summary:
389 # Current test data was not available, so something was bad with build.
394 if not status:
402 """Update the data in our build-data.txt file."""
409 # fails in the middle of generating a report, this data does not get
427 def GetBuilds(date=0): argument
430 # If date is set, get the build id from waterfall.
433 if date:
435 build_ids = GetBuildID(builder, date)
440 # If date is not set, we try to get the most recent builds.
454 # each of the rotating builders. I am not convinced this is a valid
495 if not msg:
506 # Add this failure to the error list if it's not already there.
507 if new_item not in error_list:
509 # Sort the error list by date.
511 # Calculate the earliest date to save; delete records for older failures.
512 earliest_date = int_date - MAX_SAVE_RECORDS
543 date = ''
551 if line.rstrip() == '<title>404 Not Found</title>':
552 print('Warning: File for %s (build number %d), %s was not found.' %
568 date = line.rstrip()
569 date = date[9:]
570 date_obj = time.strptime(date, '%a %b %d %H:%M:%S %Y')
573 date = time.strftime('%a %b %d %Y', date_obj)
574 elif not status and line.startswith('status: '):
577 status = words[-1]
578 elif line.find('Suite passed with a warning') != -1:
589 for i in range(0, len(words) - 1):
590 if words[i] == '--board':
598 if not t in passed and not t in failed:
609 status = 'Not found.'
610 if not build_ok:
611 return [], date, board, 0, ' '
616 build_dict['date'] = date
640 # Only keep the last 5 records (based on date)
656 return summary_result, date, board, int_date, build_dict['color']
662 os.system('mkdir -p %s/%s/%s' % (DOWNLOAD_DIR, builder, test))
677 if not os.path.isfile(target) or os.path.getsize(target) == 0:
692 # Verify that status is not expired
707 parser.error('Can only specify one of --main, --rotating or'
708 ' --failures_report.')
713 parser.error('Cannot specify both --failures_report and --omit_failures.')
715 return not too_many_options and not conflicting_failure_options
722 '--main',
729 '--rotating',
735 '--failures_report',
741 '--omit_failures',
745 help='Do not generate the failures section of the report.')
747 '--no_update',
751 help='Run reports, but do not update the data files.')
753 '--date',
754 dest='date',
757 help='The date YYYYMMDD of waterfall report.')
761 if not ValidOptions(parser, options):
768 date = options.date
774 if not prod_access:
778 with open('%s/waterfall-test-data.json' % DATA_DIR, 'r') as input_file:
781 with open('%s/test-failure-data.json' % DATA_DIR, 'r') as fp:
784 builds = GetBuilds(date)
795 if 'x86' in builder and not test.startswith('bvt'):
816 if waterfall_report_dict and not rotating_only and not failures_report:
821 if rotating_report_dict and not main_only and not failures_report:
833 if not options.no_update:
834 with open('%s/waterfall-test-data.json' % DATA_DIR, 'w') as out_file:
837 with open('%s/test-failure-data.json' % DATA_DIR, 'w') as out_file: