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
diff options
context:
space:
mode:
Diffstat (limited to 'tests/python/cycles_render_tests.py')
-rwxr-xr-xtests/python/cycles_render_tests.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
index e1b5e2d1d23..fb9a4b348b7 100755
--- a/tests/python/cycles_render_tests.py
+++ b/tests/python/cycles_render_tests.py
@@ -17,6 +17,8 @@ def render_file(filepath):
"--factory-startup",
filepath,
"-E", "CYCLES",
+ # Run with OSL enabled
+ # "--python-expr", "import bpy; bpy.context.scene.cycles.shading_system = True",
"-o", TEMP_FILE_MASK,
"-F", "PNG",
"-f", "1",
@@ -66,15 +68,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):