mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +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)
|
raise RuntimeError(msg)
|
||||||
self.result.classifiers = value
|
self.result.classifiers = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def events(self):
|
||||||
|
if self.result is None:
|
||||||
|
return []
|
||||||
|
return self.result.events
|
||||||
|
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
self.basepath = path
|
self.basepath = path
|
||||||
self.result = None
|
self.result = None
|
||||||
self.events = []
|
|
||||||
|
|
||||||
def reload(self):
|
def reload(self):
|
||||||
try:
|
try:
|
||||||
pod = read_pod(self.resultfile)
|
if os.path.isdir(self.basepath):
|
||||||
self.result = Result.from_pod(pod)
|
pod = read_pod(self.resultfile)
|
||||||
|
self.result = Result.from_pod(pod)
|
||||||
|
else:
|
||||||
|
self.result = Result()
|
||||||
|
self.result.status = Status.PENDING
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.result = Result()
|
self.result = Result()
|
||||||
self.result.status = Status.UNKNOWN
|
self.result.status = Status.UNKNOWN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user