def parse_test_info_keyval(test): # Get information from label keyval. label = parse_keyval(utils.autotest_cat(test.tag, 'keyval'))['label'] match = RE_LABEL.match(label) if match is None: raise RuntimeError('failed to parse label: %s' % label) test.platform, test.release, test.build, test.test_name = match.groups()
def parse_perf_result_keyval(test): try: content = utils.autotest_cat(test.tag, '%s/results/keyval' % test.test_name) except IOError: # File not found on autotest GS storage. return for line in content.splitlines(): m = RE_PERF_KEYVAL.match(line) if m is not None: test.perf_dict[m.group(1)] = m.group(2)