zts-report: don't crash on non-UTF-8 chars in the log (#16497)

The report generator expects the log to be clean and tidy UTF-8. That
can be a problem if you use some of the verbose/debug test runner
options, which sends all sorts of weird output from arbitrary programs
to the log.

This just makes Python a little more relaxed about such things. It
shouldn't matter in practice, as those lines didn't match the test
result regex anyway, and are discarded immediately.


Sponsored-by: https://despairlabs.com/sponsor/

Signed-off-by: Rob Norris <robn@despairlabs.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
Rob Norris 2024-09-10 10:49:14 +10:00 committed by GitHub
parent 88433e640d
commit 63253dbf4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -389,7 +389,7 @@ if os.environ.get('CI') == 'true':
def process_results(pathname): def process_results(pathname):
try: try:
f = open(pathname) f = open(pathname, errors='replace')
except IOError as e: except IOError as e:
print('Error opening file:', e) print('Error opening file:', e)
sys.exit(1) sys.exit(1)