summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linaro.org>2017-11-28 17:08:44 -0600
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-11-29 11:11:11 +0000
commitbe78bec0853eafc8e65b845c76512c458e96d695 (patch)
tree5ac42f76230f8a633eaa58339f605eeb3adcb7c5
parent4c1e5f0e3b65a22e2db386cc7210a7ca1b63d089 (diff)
downloadtest-definitios-no-nfs-be78bec0853eafc8e65b845c76512c458e96d695.tar.gz
automated/utils/test-runner.py: Only use fixup dict if exists a map entry
If no mapping exists in the fixup dictionary use the original result, sometimes you only need to map certain result values. There is the same logic in lava-dispatcher [1]. [1] https://git.linaro.org/lava/lava-dispatcher.git/tree/lava_dispatcher/connection.py#n85 Change-Id: Iafd47ebd672fb27213e20727e3f4a099429c824e Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
-rwxr-xr-xautomated/utils/test-runner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py
index d5d8e7f..4632f84 100755
--- a/automated/utils/test-runner.py
+++ b/automated/utils/test-runner.py
@@ -756,7 +756,7 @@ class ResultParser(object):
for x in ['measurement', 'units']:
if x not in data:
data[x] = ''
- if self.fixup:
+ if self.fixup and data['result'] in self.fixup:
data['result'] = self.fixup[data['result']]
self.metrics.append(data.copy())