Bug 1719226 - Properly print cmake error files. r=firefox-build-system-reviewers,andi

Differential Revision: https://phabricator.services.mozilla.com/D119134
This commit is contained in:
Mike Hommey 2021-07-06 21:47:10 +00:00
parent 899af76508
commit 3c173089ef

View File

@ -64,9 +64,10 @@ def check_run(args):
error_match = find_first_match(cmake_error_re)
def dump_file(log):
with open(log, "rb") as f:
with open(log, "r", errors="replace") as f:
print("\nContents of", log, "follow\n", file=sys.stderr)
print(f.read(), file=sys.stderr)
for line in f:
print(line, file=sys.stderr)
if output_match:
dump_file(output_match.group(1))