ci: Support joining sdkconfig.ci files that don't end in a newline

If trailing newline is missing, the last line of that item gets merged
with the first line of the next item.
This commit is contained in:
Angus Gratton 2020-04-01 17:17:30 +11:00 committed by Angus Gratton
parent 2f0a57dece
commit ff427c9650

View file

@ -73,6 +73,8 @@ class CMakeBuildSystem(BuildSystem):
logging.debug("Appending {} to sdkconfig".format(sdkconfig_name))
with open(sdkconfig_path, "r") as f_in:
for line in f_in:
if not line.endswith("\n"):
line += "\n"
f_out.write(os.path.expandvars(line))
# Also save the sdkconfig file in the build directory
shutil.copyfile(