Tests: fail automated tests on memory leaks and other internal errors
This adds a new `--debug-exit-on-error` flag. When it is set, Blender will abort with a non-zero exit code when there are internal errors. Currently, "internal errors" includes memory leaks detected by guardedalloc and error/fatal log entries in clog. The new flag is passed to Blender in various places where automated tests are run. Furthermore, the `--debug-memory` flag is used in tests, because that makes the verbose output more useful, when dealing with memory leaks. Reviewers: brecht, sergey Differential Revision: https://developer.blender.org/D8665
This commit is contained in:
@@ -448,16 +448,17 @@ class Report:
|
||||
crash = False
|
||||
output = None
|
||||
try:
|
||||
output = subprocess.check_output(command)
|
||||
except subprocess.CalledProcessError as e:
|
||||
crash = True
|
||||
completed_process = subprocess.run(command, stdout=subprocess.PIPE)
|
||||
if completed_process.returncode != 0:
|
||||
crash = True
|
||||
output = completed_process.stdout
|
||||
except BaseException as e:
|
||||
crash = True
|
||||
|
||||
if verbose:
|
||||
print(" ".join(command))
|
||||
if output:
|
||||
print(output.decode("utf-8"))
|
||||
if (verbose or crash) and output:
|
||||
print(output.decode("utf-8"))
|
||||
|
||||
# Detect missing filepaths and consider those errors
|
||||
for filepath, output_filepath in zip(remaining_filepaths[:], output_filepaths):
|
||||
|
Reference in New Issue
Block a user