summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-12-05 16:00:06 +0000
committerNaresh Kamboju <naresh.kamboju@linaro.org>2016-12-05 22:09:28 +0530
commit9555bcb728bbe616ec59ddfa0bbb78857c0975a6 (patch)
tree7c42f583f8ada5fd38845f2dd8f71adb85b7a891
parent99fe65b3ec7efafc9d86088227942e32fecedbb8 (diff)
automated: test-runner: Added support for complex test namesHEADmaster
Test names can contain '=' now. The parsing is based on regex rather than simple line split with '=' as delimiter. This adresses libhugetlbfs test parsing problem. Change-Id: I1b6e03960456abf437a2720f6e5177556c766f5a Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rwxr-xr-xautomated/utils/test-runner.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py
index ed8b755..ad84d28 100755
--- a/automated/utils/test-runner.py
+++ b/automated/utils/test-runner.py
@@ -429,6 +429,10 @@ class ResultParser(object):
def parse_stdout(self):
with open('%s/stdout.log' % self.result_path, 'r') as f:
+ test_case_re = re.compile("TEST_CASE_ID=(P?.*)")
+ result_re = re.compile("RESULT=(P?.*)")
+ measurement_re = re.compile("MEASUREMENT=(P?.*)")
+ units_re = re.compile("UNITS=(P?.*)")
for line in f:
if re.match(r'\<(|LAVA_SIGNAL_TESTCASE )TEST_CASE_ID=.*', line):
line = line.strip('\n').strip('<>').split(' ')
@@ -438,11 +442,18 @@ class ResultParser(object):
'units': ''}
for string in line:
- parts = string.split('=')
- if len(parts) == 2:
- key, value = parts
- key = key.lower()
- data[key] = value
+ test_case_match = test_case_re.match(string)
+ result_match = result_re.match(string)
+ measurement_match = measurement_re.match(string)
+ units_match = units_re.match(string)
+ if test_case_match:
+ data['test_case_id'] = test_case_match.group(0)
+ if result_match:
+ data['result'] = result_match.group(0)
+ if measurement_match:
+ data['measurement'] = measurement_match.group(0)
+ if units_match:
+ data['units'] = units_match.group(0)
self.metrics.append(data.copy())