mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
framework/output: output fixes
- Get events from the result - Correctly handle pending jobs
This commit is contained in:
parent
79aaef9986
commit
879dfc7700
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user