def create_memcheck_report(records, db_url, db_collection, output_path):
""" Create memcheck timeline HTML report for records.
"""
- if db_collection == 'pre_commit':
- db_collection = 'commit' # pre-commit jobs building report from past commits
records.sort(
key=lambda item: f"{item['status']}{item['device']}{item['model']}{item['test_name']}")
timelines = query_timeline(records, db_url, db_collection)
parser.add_argument('--db_url', required=not is_dryrun,
help='MongoDB URL in a for "mongodb://server:port".')
parser.add_argument('--db_collection', required=not is_dryrun,
- help=f'Collection name in {DATABASE} database to upload')
+ help=f'Collection name in {DATABASE} database to upload.',
+ choices=["commit", "nightly", "weekly"])
parser.add_argument('--artifact_root', required=True,
help=f'A root directory to strip from log path before upload.')
parser.add_argument('--append', help='JSON to append to each item.')