Esempio n. 1
0
def TestKeysForReportTemplate(template_id):
    template = ndb.Key('ReportTemplate', int(template_id)).get()
    if not template:
        return

    for table_row in template.template['rows']:
        for desc in report_query.TableRowDescriptors(table_row):
            for test_path in desc.ToTestPathsSync():
                yield utils.TestMetadataKey(test_path)
                yield utils.OldStyleTestKey(test_path)
Esempio n. 2
0
def _GetInternalOnly(template):
    futures = []
    for table_row in template['rows']:
        for desc in report_query.TableRowDescriptors(table_row):
            for test_path in desc.ToTestPathsSync():
                futures.append(utils.TestMetadataKey(test_path).get_async())
            desc.statistic = 'avg'
            for test_path in desc.ToTestPathsSync():
                futures.append(utils.TestMetadataKey(test_path).get_async())
    ndb.Future.wait_all(futures)
    tests = [future.get_result() for future in futures]
    return any(test.internal_only for test in tests if test)