aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimov <sergei.trofimov@arm.com>2018-03-01 09:53:49 +0000
committerMarc Bonnici <marc.bonnici@arm.com>2018-03-08 11:18:12 +0000
commit879dfc77005e4e97b734153fd341ce3f479db52a (patch)
tree33dcac280326e49c800e17c8f06ff4c25c6d7919
parent79aaef9986b433a617cab71e45a1e9335dcb2a03 (diff)
framework/output: output fixes
- Get events from the result - Correctly handle pending jobs
-rw-r--r--wa/framework/output.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/wa/framework/output.py b/wa/framework/output.py
index 8585d2d3..c29c5912 100644
--- a/wa/framework/output.py
+++ b/wa/framework/output.py
@@ -72,15 +72,24 @@ class Output(object):
raise RuntimeError(msg)
self.result.classifiers = value
+ @property
+ def events(self):
+ if self.result is None:
+ return []
+ return self.result.events
+
def __init__(self, path):
self.basepath = path
self.result = None
- self.events = []
def reload(self):
try:
- pod = read_pod(self.resultfile)
- self.result = Result.from_pod(pod)
+ if os.path.isdir(self.basepath):
+ pod = read_pod(self.resultfile)
+ self.result = Result.from_pod(pod)
+ else:
+ self.result = Result()
+ self.result.status = Status.PENDING
except Exception as e:
self.result = Result()
self.result.status = Status.UNKNOWN