buildman: Correct counting of build failures on retry
When a build is to be performed, buildman checks to see if it has already been done. In most cases it will not bother trying again. However, it was not reading the return code from the 'done' file, so if the result was a failure, it would not be counted. This depresses the 'failure' count stats that buildman prints in this case. Fix this bug by always reading the return code. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
823e60b62a
commit
fb3954f9ea
|
@ -138,10 +138,11 @@ class BuilderThread(threading.Thread):
|
|||
result.already_done = os.path.exists(done_file)
|
||||
will_build = (force_build or force_build_failures or
|
||||
not result.already_done)
|
||||
if result.already_done and will_build:
|
||||
if result.already_done:
|
||||
# Get the return code from that build and use it
|
||||
with open(done_file, 'r') as fd:
|
||||
result.return_code = int(fd.readline())
|
||||
if will_build:
|
||||
err_file = self.builder.GetErrFile(commit_upto, brd.target)
|
||||
if os.path.exists(err_file) and os.stat(err_file).st_size:
|
||||
result.stderr = 'bad'
|
||||
|
|
Loading…
Reference in New Issue