mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
autotest: copy the build_binaries.sh script before running
this prevents altering the script while running
This commit is contained in:
parent
8ec5ba9cec
commit
01b2ecbc55
@ -80,7 +80,13 @@ def build_all():
|
||||
def build_binaries():
|
||||
'''run the build_binaries.sh script'''
|
||||
print("Running build_binaries.sh")
|
||||
if util.run_cmd(util.reltopdir('Tools/scripts/build_binaries.sh'), dir=util.reltopdir('.')) != 0:
|
||||
import shutil
|
||||
# copy the script as it changes git branch, which can change the script while running
|
||||
orig=util.reltopdir('Tools/scripts/build_binaries.sh')
|
||||
copy=util.reltopdir('./build_binaries.sh')
|
||||
shutil.copyfile(orig, copy)
|
||||
shutil.copymode(orig, copy)
|
||||
if util.run_cmd(copy, dir=util.reltopdir('.')) != 0:
|
||||
print("Failed build_binaries.sh")
|
||||
return False
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user