Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-07-29 03:04:45 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-07-29 04:29:05 +0300
commit52fb441c13771b21d3ab1b50fcadfe257346f264 (patch)
tree1149df1e198a873b9d8aba9d1a139fe88eed446a /tests
parente30f9b04fc72114dbbf56fcbcf4fad57f97ac6ee (diff)
Fix Cycles ctests not always deleting fail.png files on success.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/python/cycles_render_tests.py13
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):