mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
Tools: build_binaries.py: print errors out at end of run
This commit is contained in:
parent
cff8a98aa5
commit
80cb2e343c
@ -326,9 +326,10 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
else:
|
||||
framesuffix = "-%s" % frame
|
||||
if not self.checkout(vehicle, tag, board, frame):
|
||||
self.progress("Failed checkout of %s %s %s %s" %
|
||||
(vehicle, board, tag, frame))
|
||||
self.error_count += 1
|
||||
msg = ("Failed checkout of %s %s %s %s" %
|
||||
(vehicle, board, tag, frame,))
|
||||
self.progress(msg)
|
||||
self.error_strings.append(msg)
|
||||
continue
|
||||
if self.skip_board_waf(board):
|
||||
continue
|
||||
@ -360,9 +361,10 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
"".join([binaryname, framesuffix]))
|
||||
self.run_waf(["build", "--targets", target])
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.progress("Failed build of %s %s%s %s" %
|
||||
(vehicle, board, framesuffix, tag))
|
||||
self.error_count += 1
|
||||
msg = ("Failed build of %s %s%s %s" %
|
||||
(vehicle, board, framesuffix, tag))
|
||||
self.progress(msg)
|
||||
self.error_strings.append(msg)
|
||||
continue
|
||||
|
||||
bare_path = os.path.join(self.buildroot,
|
||||
@ -392,9 +394,10 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
framesuffix = "-%s" % frame
|
||||
|
||||
if not self.checkout(vehicle, tag, "PX4", frame):
|
||||
self.progress("Failed checkout of %s %s %s %s" %
|
||||
(vehicle, "PX4", tag, frame))
|
||||
self.error_count += 1
|
||||
msg = ("Failed checkout of %s %s %s %s" %
|
||||
(vehicle, "PX4", tag, frame))
|
||||
self.progress(msg)
|
||||
self.error_strings.append(msg)
|
||||
self.checkout(vehicle, "latest")
|
||||
continue
|
||||
|
||||
@ -436,9 +439,10 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
os.path.join("bin",
|
||||
"".join([binaryname, framesuffix]))])
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.progress("Failed build of %s %s%s %s for %s" %
|
||||
(vehicle, board, framesuffix, tag, v))
|
||||
self.error_count += 1
|
||||
msg = ("Failed build of %s %s%s %s for %s" %
|
||||
(vehicle, board, framesuffix, tag, v))
|
||||
self.progress(msg)
|
||||
self.error_strings.append(msg)
|
||||
continue
|
||||
|
||||
oldfile = os.path.join(self.buildroot, px4_v, "bin",
|
||||
@ -449,9 +453,10 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
shutil.copyfile(oldfile, newfile)
|
||||
except Exception as e:
|
||||
self.progress("FIXME: narrow exception (%s)" % repr(e))
|
||||
self.progress("Failed build copy of %s PX4%s %s for %s" %
|
||||
(vehicle, framesuffix, tag, v))
|
||||
self.error_count += 1
|
||||
msg = ("Failed build copy of %s PX4%s %s for %s" %
|
||||
(vehicle, framesuffix, tag, v))
|
||||
self.progress(msg)
|
||||
self.error_strings.append(msg)
|
||||
continue
|
||||
# FIXME: why the two stage copy?!
|
||||
self.copyit(newfile, ddir, tag, vehicle)
|
||||
@ -590,7 +595,7 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
self.binaries = os.path.join(os.getcwd(), "..", "buildlogs",
|
||||
"binaries")
|
||||
self.basedir = os.getcwd()
|
||||
self.error_count = 0
|
||||
self.error_strings = []
|
||||
|
||||
if os.path.exists("config.mk"):
|
||||
# FIXME: narrow exception
|
||||
@ -615,7 +620,9 @@ is bob we will attempt to checkout bob-AVR'''
|
||||
|
||||
self.generate_manifest()
|
||||
|
||||
sys.exit(self.error_count)
|
||||
for error_string in self.error_strings:
|
||||
self.progress("%s" % error_string)
|
||||
sys.exit(len(self.error_strings))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user