Fix line endings produced by update_cc_test_checks.py

Use the same appraoch as update_llc_test_checks.py to always write \n
line endings. This should fix the Windows buildbots.
This commit is contained in:
Alex Richardson 2020-02-14 15:17:27 +00:00
parent f54e7b4e3a
commit c29310707e
1 changed files with 4 additions and 4 deletions

View File

@ -292,10 +292,10 @@ def main():
False, args.function_signature)
output_lines.append(line.rstrip('\n'))
# Update the test file.
with open(filename, 'w') as f:
for line in output_lines:
f.write(line + '\n')
common.debug('Writing %d lines to %s...' % (len(output_lines), filename))
with open(filename, 'wb') as f:
f.writelines(['{}\n'.format(l).encode('utf-8') for l in output_lines])
return 0