From a396a0d0fd2da399170742ce1c5c0415bc12a90e Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 20 Mar 2018 16:08:08 +1100 Subject: [PATCH] Tools: build_binaries.py: copy more build products into output binaries directory --- Tools/scripts/build_binaries.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Tools/scripts/build_binaries.py b/Tools/scripts/build_binaries.py index 4e6b9878ef..390a89d20f 100755 --- a/Tools/scripts/build_binaries.py +++ b/Tools/scripts/build_binaries.py @@ -379,15 +379,19 @@ is bob we will attempt to checkout bob-AVR''' board, "bin", "".join([binaryname, framesuffix])) - px4_path = "".join([bare_path, ".px4"]) - if os.path.exists(px4_path): - path = px4_path - else: - path = bare_path - try: - self.copyit(path, ddir, tag, vehicle) - except Exception as e: - self.progress("Failed to copy %s to %s: %s" % (path, ddir, str(e))) + files_to_copy = [] + if os.path.exists(bare_path): + files_to_copy.append(bare_path) + for extension in [".px4", ".apj", ".abin"]: + filepath = "".join([bare_path, extension]) + if os.path.exists(filepath): + files_to_copy.append(filepath) + + for path in files_to_copy: + try: + self.copyit(path, ddir, tag, vehicle) + except Exception as e: + self.progress("Failed to copy %s to %s: %s" % (path, ddir, str(e))) # why is touching this important? -pb20170816 self.touch_filepath(os.path.join(self.binaries, vehicle_binaries_subdir, tag))