CTests: Initial work to cover Cycles nodes with OpenGL tests
[blender.git] / tests / python / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # Contributor(s): Jacques Beaurain.
18 #
19 # ***** END GPL LICENSE BLOCK *****
20
21 # --env-system-scripts allows to run without the install target. 
22
23 # Use '--write-blend=/tmp/test.blend' to view output
24
25 # Some tests are interesting but take too long to run
26 # and don't give deterministic results
27 set(USE_EXPERIMENTAL_TESTS FALSE)
28
29 set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../lib/tests)
30 set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
31
32 # ugh, any better way to do this on testing only?
33 execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
34
35 #~      if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
36 #~              message(FATAL_ERROR "CMake test directory not found!")
37 #~      endif()
38
39 # all calls to blender use this
40 if(APPLE)
41         if(${CMAKE_GENERATOR} MATCHES "Xcode")
42                 set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/Debug/blender.app/Contents/MacOS/blender)
43         else()
44                 set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender.app/Contents/MacOS/blender)
45         endif()
46 else()
47         set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender)
48 endif()
49
50 # for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no 
51 set(TEST_BLENDER_EXE_BARE ${TEST_BLENDER_EXE})
52 set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background -noaudio --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts)
53
54
55 # ------------------------------------------------------------------------------
56 # GENERAL PYTHON CORRECTNESS TESTS
57 add_test(script_load_keymap ${TEST_BLENDER_EXE}
58         --python ${CMAKE_CURRENT_LIST_DIR}/bl_keymap_completeness.py
59 )
60
61 add_test(script_load_addons ${TEST_BLENDER_EXE}
62         --python ${CMAKE_CURRENT_LIST_DIR}/bl_load_addons.py
63 )
64
65 add_test(script_load_modules ${TEST_BLENDER_EXE}
66         --python ${CMAKE_CURRENT_LIST_DIR}/bl_load_py_modules.py
67 )
68
69 # test running operators doesn't segfault under various conditions
70 if(USE_EXPERIMENTAL_TESTS)
71         add_test(script_run_operators ${TEST_BLENDER_EXE}
72                 --python ${CMAKE_CURRENT_LIST_DIR}/bl_run_operators.py
73         )
74 endif()
75
76 # ------------------------------------------------------------------------------
77 # PY API TESTS
78 add_test(script_pyapi_bpy_path ${TEST_BLENDER_EXE}
79         --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_path.py
80 )
81
82 add_test(script_pyapi_bpy_utils_units ${TEST_BLENDER_EXE}
83         --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_utils_units.py
84 )
85
86 # test running mathutils testing script
87 add_test(script_pyapi_mathutils ${TEST_BLENDER_EXE}
88         --python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_mathutils.py
89 )
90
91 # ------------------------------------------------------------------------------
92 # MODELING TESTS
93 add_test(bevel ${TEST_BLENDER_EXE}
94         ${TEST_SRC_DIR}/modeling/bevel_regression.blend
95         --python-text run_tests
96 )
97
98 # ------------------------------------------------------------------------------
99 # IO TESTS
100
101 # OBJ Import tests
102 # disabled until updated & working
103 if(FALSE)
104 add_test(import_obj_cube ${TEST_BLENDER_EXE}
105         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
106         --run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/cube.obj'\)
107         --md5=39cce4bacac2d1b18fc470380279bc15 --md5_method=SCENE
108         --write-blend=${TEST_OUT_DIR}/import_obj_cube.blend
109 )
110
111 add_test(import_obj_nurbs_cyclic ${TEST_BLENDER_EXE}
112         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
113         --run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/nurbs_cyclic.obj'\)
114         --md5=ad3c307e5883224a0492378cd32691ab --md5_method=SCENE
115         --write-blend=${TEST_OUT_DIR}/import_obj_nurbs_cyclic.blend
116 )
117
118 add_test(import_obj_makehuman ${TEST_BLENDER_EXE}
119         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
120         --run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/makehuman.obj'\)
121         --md5=c9f78b185e58358daa4ecaecfa75464e --md5_method=SCENE
122         --write-blend=${TEST_OUT_DIR}/import_obj_makehuman.blend
123 )
124 endif()
125
126 # OBJ Export tests
127 add_test(export_obj_cube ${TEST_BLENDER_EXE}
128         ${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
129         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
130         --run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_cube.obj',use_selection=False\)
131         --md5_source=${TEST_OUT_DIR}/export_obj_cube.obj
132         --md5_source=${TEST_OUT_DIR}/export_obj_cube.mtl
133         --md5=e80660437ad9bfe082849641c361a233 --md5_method=FILE
134 )
135
136 add_test(export_obj_nurbs ${TEST_BLENDER_EXE}
137         ${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
138         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
139         --run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_nurbs.obj',use_selection=False,use_nurbs=True\)
140         --md5_source=${TEST_OUT_DIR}/export_obj_nurbs.obj
141         --md5_source=${TEST_OUT_DIR}/export_obj_nurbs.mtl
142         --md5=a733ae4fa4a591ea9b0912da3af042de --md5_method=FILE
143 )
144
145 # disabled until updated & working
146 if(FALSE)
147 add_test(export_obj_all_objects ${TEST_BLENDER_EXE}
148         ${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
149         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
150         --run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_all_objects.obj',use_selection=False,use_nurbs=True\)
151         --md5_source=${TEST_OUT_DIR}/export_obj_all_objects.obj
152         --md5_source=${TEST_OUT_DIR}/export_obj_all_objects.mtl
153         --md5=04b3ed97cede07a19548fc518ce9f8ca --md5_method=FILE
154 )
155 endif()
156
157
158
159 # PLY Import tests
160 add_test(import_ply_cube ${TEST_BLENDER_EXE}
161         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
162         --run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/cube_ascii.ply'\)
163         --md5=527134343c27fc0ea73115b85fbfd3ac --md5_method=SCENE
164         --write-blend=${TEST_OUT_DIR}/import_ply_cube.blend
165 )
166
167 add_test(import_ply_bunny ${TEST_BLENDER_EXE}
168         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
169         --run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/bunny2.ply'\)
170         --md5=6ea5b8533400a17accf928b8fd024eaa --md5_method=SCENE
171         --write-blend=${TEST_OUT_DIR}/import_ply_bunny.blend
172 )
173
174 add_test(import_ply_small_holes ${TEST_BLENDER_EXE}
175         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
176         --run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/many_small_holes.ply'\)
177         --md5=c3093e26ecae5b6d59fbbcf2a0d0b39f --md5_method=SCENE
178         --write-blend=${TEST_OUT_DIR}/import_ply_small_holes.blend
179 )
180
181 # PLY Export
182 # disabled until updated & working
183 if(FALSE)
184 add_test(export_ply_cube_all_data ${TEST_BLENDER_EXE}
185         ${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
186         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
187         --run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/export_ply_cube_all_data.ply'\)
188         --md5_source=${TEST_OUT_DIR}/export_ply_cube_all_data.ply
189         --md5=6adc3748ceae8298496f99d0e7e76c15 --md5_method=FILE
190 )
191
192 add_test(export_ply_suzanne_all_data ${TEST_BLENDER_EXE}
193         ${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
194         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
195         --run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/export_ply_suzanne_all_data.ply'\)
196         --md5_source=${TEST_OUT_DIR}/export_ply_suzanne_all_data.ply
197         --md5=68ba23f02efd6511bfd093f45f703221 --md5_method=FILE
198 )
199 endif()
200
201 add_test(export_ply_vertices ${TEST_BLENDER_EXE}  # lame, add a better one
202         ${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
203         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
204         --run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/export_ply_vertices.ply'\)
205         --md5_source=${TEST_OUT_DIR}/export_ply_vertices.ply
206         --md5=37faba0aa2014451b27f951afa92f870 --md5_method=FILE
207 )
208
209
210 # STL Import tests
211 # disabled until updated & working
212 if(FALSE)
213 add_test(import_stl_cube ${TEST_BLENDER_EXE}
214         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
215         --run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/cube.stl'\)
216         --md5=8ceb5bb7e1cb5f4342fa1669988c66b4 --md5_method=SCENE
217         --write-blend=${TEST_OUT_DIR}/import_stl_cube.blend
218 )
219
220 add_test(import_stl_conrod ${TEST_BLENDER_EXE}
221         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
222         --run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/conrod.stl'\)
223         --md5=690a4b8eb9002dcd8631c5a575ea7348 --md5_method=SCENE
224         --write-blend=${TEST_OUT_DIR}/import_stl_conrod.blend
225 )
226
227 add_test(import_stl_knot_max_simplified ${TEST_BLENDER_EXE}
228         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
229         --run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/knot_max_simplified.stl'\)
230         --md5=baf82803f45a84ec4ddbad9cef57dd3e --md5_method=SCENE
231         --write-blend=${TEST_OUT_DIR}/import_stl_knot_max_simplified.blend
232 )
233 endif()
234
235 # STL Export
236 # disabled until updated & working
237 if(FALSE)
238 add_test(export_stl_cube_all_data ${TEST_BLENDER_EXE}
239         ${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
240         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
241         --run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/export_stl_cube_all_data.stl'\)
242         --md5_source=${TEST_OUT_DIR}/export_stl_cube_all_data.stl
243         --md5=64cb97c0cabb015e1c3f76369835075a --md5_method=FILE
244 )
245
246 add_test(export_stl_suzanne_all_data ${TEST_BLENDER_EXE}
247         ${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
248         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
249         --run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/export_stl_suzanne_all_data.stl'\)
250         --md5_source=${TEST_OUT_DIR}/export_stl_suzanne_all_data.stl
251         --md5=e9b23c97c139ad64961c635105bb9192 --md5_method=FILE
252 )
253
254 add_test(export_stl_vertices ${TEST_BLENDER_EXE}  # lame, add a better one
255         ${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
256         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
257         --run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/export_stl_vertices.stl'\)
258         --md5_source=${TEST_OUT_DIR}/export_stl_vertices.stl
259         --md5=3fd3c877e573beeebc782532cc005820 --md5_method=FILE
260 )
261 endif()
262
263
264 # X3D Import
265 # disabled until updated & working
266 if(FALSE)
267 add_test(import_x3d_cube ${TEST_BLENDER_EXE}
268         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
269         --run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/color_cube.x3d'\)
270         --md5=3fae9be004199c145941cd3f9f80ad7b --md5_method=SCENE
271         --write-blend=${TEST_OUT_DIR}/import_x3d_cube.blend
272 )
273
274 add_test(import_x3d_teapot ${TEST_BLENDER_EXE}
275         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
276         --run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/teapot.x3d'\)
277         --md5=8ee196c71947dce4199d55698501691e --md5_method=SCENE
278         --write-blend=${TEST_OUT_DIR}/import_x3d_teapot.blend
279 )
280
281 add_test(import_x3d_suzanne_material ${TEST_BLENDER_EXE}
282         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
283         --run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/suzanne_material.x3d'\)
284         --md5=3edea1353257d8b5a5f071942f417be6 --md5_method=SCENE
285         --write-blend=${TEST_OUT_DIR}/import_x3d_suzanne_material.blend
286 )
287
288 # X3D Export
289 add_test(export_x3d_cube ${TEST_BLENDER_EXE}
290         ${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
291         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
292         --run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_cube.x3d',use_selection=False\)
293         --md5_source=${TEST_OUT_DIR}/export_x3d_cube.x3d
294         --md5=05312d278fe41da33560fdfb9bdb268f --md5_method=FILE
295 )
296
297 add_test(export_x3d_nurbs ${TEST_BLENDER_EXE}
298         ${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
299         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
300         --run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_nurbs.x3d',use_selection=False\)
301         --md5_source=${TEST_OUT_DIR}/export_x3d_nurbs.x3d
302         --md5=4286d4a2aa507ef78b22ddcbdcc88481 --md5_method=FILE
303 )
304
305 add_test(export_x3d_all_objects ${TEST_BLENDER_EXE}
306         ${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
307         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
308         --run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_all_objects.x3d',use_selection=False\)
309         --md5_source=${TEST_OUT_DIR}/export_x3d_all_objects.x3d
310         --md5=f5f9fa4c5619a0eeab66685aafd2f7f0 --md5_method=FILE
311 )
312 endif()
313
314
315
316 # 3DS Import
317 # disabled until updated & working
318 if(FALSE)
319 add_test(import_3ds_cube ${TEST_BLENDER_EXE}
320         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
321         --run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/cube.3ds'\)
322         --md5=cb5a45c35a343c3f5beca2a918472951 --md5_method=SCENE
323         --write-blend=${TEST_OUT_DIR}/import_3ds_cube.blend
324 )
325
326 add_test(import_3ds_hierarchy_lara ${TEST_BLENDER_EXE}
327         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
328         --run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/hierarchy_lara.3ds'\)
329         --md5=766c873d9fdb5f190e43796cfbae63b6 --md5_method=SCENE
330         --write-blend=${TEST_OUT_DIR}/import_3ds_hierarchy_lara.blend
331 )
332
333 add_test(import_3ds_hierarchy_greek_trireme ${TEST_BLENDER_EXE}
334         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
335         --run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/hierarchy_greek_trireme.3ds'\)
336         --md5=b62ee30101e8999cb91ef4f8a8760056 --md5_method=SCENE
337         --write-blend=${TEST_OUT_DIR}/import_3ds_hierarchy_greek_trireme.blend
338 )
339 endif()
340
341 # 3DS Export
342 # disabled until updated & working
343 if(FALSE)
344 add_test(export_3ds_cube ${TEST_BLENDER_EXE}
345         ${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
346         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
347         --run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/export_3ds_cube.3ds',use_selection=False\)
348         --md5_source=${TEST_OUT_DIR}/export_3ds_cube.3ds
349         --md5=a31f5071b6c6dc7445b9099cdc7f63b3 --md5_method=FILE
350 )
351
352 add_test(export_3ds_nurbs ${TEST_BLENDER_EXE}
353         ${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
354         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
355         --run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/export_3ds_nurbs.3ds',use_selection=False\)
356         --md5_source=${TEST_OUT_DIR}/export_3ds_nurbs.3ds
357         --md5=5bdd21be3c80d814fbc83cb25edb08c2 --md5_method=FILE
358 )
359
360 add_test(export_3ds_all_objects ${TEST_BLENDER_EXE}
361         ${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
362         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
363         --run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/export_3ds_all_objects.3ds',use_selection=False\)
364         --md5_source=${TEST_OUT_DIR}/export_3ds_all_objects.3ds
365         --md5=68447761ab0ca38e1e22e7c177ed48a8 --md5_method=FILE
366 )
367 endif()
368
369
370
371 # FBX Export
372 # 'use_metadata=False' for reliable md5's
373 # disabled until updated & working
374 if(FALSE)
375 add_test(export_fbx_cube ${TEST_BLENDER_EXE}
376         ${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
377         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
378         --run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/export_fbx_cube.fbx',use_selection=False,use_metadata=False\)
379         --md5_source=${TEST_OUT_DIR}/export_fbx_cube.fbx
380         --md5=59a35577462f95f9a0b4e6035226ce9b --md5_method=FILE
381 )
382
383 add_test(export_fbx_nurbs ${TEST_BLENDER_EXE}
384         ${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
385         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
386         --run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/export_fbx_nurbs.fbx',use_selection=False,use_metadata=False\)
387         --md5_source=${TEST_OUT_DIR}/export_fbx_nurbs.fbx
388         --md5=d31875f18f613fa0c3b16e978f87f6f8 --md5_method=FILE
389 )
390
391 add_test(export_fbx_all_objects ${TEST_BLENDER_EXE}
392         ${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
393         --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
394         --run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/export_fbx_all_objects.fbx',use_selection=False,use_metadata=False\)
395         --md5_source=${TEST_OUT_DIR}/export_fbx_all_objects.fbx
396         --md5=b35eb2a9d0e73762ecae2278c25a38ac --md5_method=FILE
397 )
398 endif()
399
400 if(WITH_CYCLES)
401         if(OPENIMAGEIO_IDIFF AND EXISTS "${TEST_SRC_DIR}/cycles/ctests/shader")
402                 macro(add_cycles_render_test subject)
403                         if(MSVC)
404                                 add_test(NAME cycles_${subject}_test
405                                         COMMAND
406                                                 "$<TARGET_FILE_DIR:blender>/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$<CONFIG:Debug>:_d>"
407                                                 ${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
408                                         -blender "$<TARGET_FILE:blender>"
409                                         -testdir "${TEST_SRC_DIR}/cycles/ctests/${subject}"
410                                         -idiff "${OPENIMAGEIO_IDIFF}"
411                                 )
412                         else()
413                                 add_test(cycles_${subject}_test
414                                          ${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
415                                         -blender "${TEST_BLENDER_EXE_BARE}"
416                                         -testdir "${TEST_SRC_DIR}/cycles/ctests/${subject}"
417                                         -idiff "${OPENIMAGEIO_IDIFF}"
418                                 )
419                         endif()
420                 endmacro()
421                 if(WITH_OPENGL_TESTS)
422                         add_cycles_render_test(opengl)
423                 endif()
424                 add_cycles_render_test(reports)
425                 add_cycles_render_test(render)
426                 add_cycles_render_test(shader)
427         else()
428                 MESSAGE(STATUS "Disabling Cycles tests because tests folder does not exist")
429         endif()
430 endif()