From: Ondrej Lichtner <olichtne(a)redhat.com>
If there were no result values added to a PerfRepoResult object there's
no need to send it to PerfRepo as it doesn't store anything. Instead
we'll skip the operation and output a debug message.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Task.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index bc8dca9..d3ce6ba 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -576,6 +576,10 @@ class PerfRepoAPI(object):
elif isinstance(result, Noop):
return
elif isinstance(result, PerfRepoResult):
+ if len(result.get_testExecution().get_values()) < 1:
+ logging.debug("PerfRepoResult with no result data, skipping "\
+ "send to PerfRepo.")
+ return
h = result.generate_hash()
logging.debug("Adding hash '%s' as tag to result." % h)
result.add_tag(h)
--
2.6.1