mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
autotest: test_build_options.py: undef variables before setting them
This commit is contained in:
parent
836ae87955
commit
fe740681af
@ -31,7 +31,10 @@ class TestBuildOptions(object):
|
||||
return mod.BUILD_OPTIONS
|
||||
|
||||
def write_defines_to_file(self, defines, filepath):
|
||||
content = "\n".join(["define %s %s" % (a, b) for (a, b) in defines.items()])
|
||||
lines = []
|
||||
lines.extend(["undef %s\n" % (a, ) for (a, b) in defines.items()])
|
||||
lines.extend(["define %s %s\n" % (a, b) for (a, b) in defines.items()])
|
||||
content = "".join(lines)
|
||||
with open(filepath, "w") as f:
|
||||
f.write(content)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user