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:
authorCampbell Barton <ideasman42@gmail.com>2017-08-20 08:50:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-20 08:50:15 +0300
commit74974881491d0a8140de5f67421b04a6584ca3d8 (patch)
tree48415c6929cb179fc303e4619bc5f231c544d268 /tests
parent64c7cf203627d5fc02c03e2a74de197ded36e129 (diff)
parent46cf33bf0146946ed05756a9b8bfa1318538f020 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'tests')
-rwxr-xr-xtests/python/cycles_render_tests.py31
1 files changed, 19 insertions, 12 deletions
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
index 77bee4953ba..d4e796f35ae 100755
--- a/tests/python/cycles_render_tests.py
+++ b/tests/python/cycles_render_tests.py
@@ -5,6 +5,7 @@ import argparse
import glob
import os
import pathlib
+import shlex
import shutil
import subprocess
import sys
@@ -52,38 +53,44 @@ def render_file(filepath):
dirname = os.path.dirname(filepath)
basedir = os.path.dirname(dirname)
subject = os.path.basename(dirname)
+
+ custom_args = os.getenv('CYCLESTEST_ARGS')
+ custom_args = shlex.split(custom_args) if custom_args else []
+
+ # OSL and GPU examples
+ # custom_args += ["--python-expr", "import bpy; bpy.context.scene.cycles.shading_system = True"]
+ # custom_args += ["--python-expr", "import bpy; bpy.context.scene.cycles.device = 'GPU'"]
+
if subject == 'opengl':
- command = (
+ command = [
BLENDER,
"--window-geometry", "0", "0", "1", "1",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
filepath,
- "-E", "CYCLES",
- # Run with OSL enabled
- # "--python-expr", "import bpy; bpy.context.scene.cycles.shading_system = True",
+ "-E", "CYCLES"]
+ command += custom_args
+ command += [
"-o", TEMP_FILE_MASK,
"-F", "PNG",
'--python', os.path.join(basedir,
"util",
- "render_opengl.py")
- )
+ "render_opengl.py")]
else:
- command = (
+ command = [
BLENDER,
"--background",
"-noaudio",
"--factory-startup",
"--enable-autoexec",
filepath,
- "-E", "CYCLES",
- # Run with OSL enabled
- # "--python-expr", "import bpy; bpy.context.scene.cycles.shading_system = True",
+ "-E", "CYCLES"]
+ command += custom_args
+ command += [
"-o", TEMP_FILE_MASK,
"-F", "PNG",
- "-f", "1",
- )
+ "-f", "1"]
try:
output = subprocess.check_output(command)
if VERBOSE: