diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-07-29 03:04:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-07-29 04:29:05 +0300 |
commit | 52fb441c13771b21d3ab1b50fcadfe257346f264 (patch) | |
tree | 1149df1e198a873b9d8aba9d1a139fe88eed446a /tests/python | |
parent | e30f9b04fc72114dbbf56fcbcf4fad57f97ac6ee (diff) |
Fix Cycles ctests not always deleting fail.png files on success.
Diffstat (limited to 'tests/python')
-rwxr-xr-x | tests/python/cycles_render_tests.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py index e1b5e2d1d23..1434447416d 100755 --- a/tests/python/cycles_render_tests.py +++ b/tests/python/cycles_render_tests.py @@ -66,15 +66,16 @@ def verify_output(filepath): ) try: subprocess.check_output(command) - if os.path.exists(failed_image): - os.remove(failed_image) - return True + failed = False except subprocess.CalledProcessError as e: - if e.returncode != 1: - shutil.copy(TEMP_FILE, failed_image) if VERBOSE: print(e.output.decode("utf-8")) - return e.returncode == 1 + failed = e.returncode != 1 + if failed: + shutil.copy(TEMP_FILE, failed_image) + elif os.path.exists(failed_image): + os.remove(failed_image) + return not failed def run_test(filepath): |