autotest: remove binary before attempting to build it
this fixes behaviour when --no-configure and --no-build are passed in, causing subsequent test steps to fail rather than proceed with an old binary
This commit is contained in:
parent
a497c06e83
commit
085a10a3a1
@ -485,6 +485,11 @@ def run_step(step):
|
||||
return util.build_replay(board='SITL')
|
||||
|
||||
if vehicle_binary is not None:
|
||||
try:
|
||||
binary = binary_path(step, debug=opts.debug)
|
||||
os.unlink(binary)
|
||||
except (FileNotFoundError, ValueError):
|
||||
pass
|
||||
if len(vehicle_binary.split(".")) == 1:
|
||||
return util.build_SITL(vehicle_binary, **build_opts)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user