From be78bec0853eafc8e65b845c76512c458e96d695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Tue, 28 Nov 2017 17:08:44 -0600 Subject: automated/utils/test-runner.py: Only use fixup dict if exists a map entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- automated/utils/test-runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) -- cgit v1.2.3