2011-01-21 00:06:30 +00:00
|
|
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
# Contributor(s): Jacques Beaurain.
|
|
|
|
#
|
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
2017-04-21 14:20:35 +00:00
|
|
|
# --env-system-scripts allows to run without the install target.
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# Use '--write-blend=/tmp/test.blend' to view output
|
|
|
|
|
2014-03-26 20:30:22 +00:00
|
|
|
# Some tests are interesting but take too long to run
|
|
|
|
# and don't give deterministic results
|
|
|
|
set(USE_EXPERIMENTAL_TESTS FALSE)
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../lib/tests)
|
|
|
|
set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
|
|
|
|
|
2011-03-16 12:06:12 +00:00
|
|
|
# ugh, any better way to do this on testing only?
|
2012-11-03 15:49:38 +00:00
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
|
2011-03-16 12:06:12 +00:00
|
|
|
|
2012-10-29 15:43:54 +00:00
|
|
|
#~ if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
|
|
|
|
#~ message(FATAL_ERROR "CMake test directory not found!")
|
|
|
|
#~ endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# all calls to blender use this
|
2011-03-13 13:09:18 +00:00
|
|
|
if(APPLE)
|
2014-02-02 22:35:00 +00:00
|
|
|
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
2017-08-03 22:11:42 +00:00
|
|
|
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup)
|
2014-02-02 22:35:00 +00:00
|
|
|
else()
|
2017-08-03 22:11:42 +00:00
|
|
|
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts)
|
2014-02-03 02:55:26 +00:00
|
|
|
endif()
|
2011-03-13 13:09:18 +00:00
|
|
|
else()
|
2017-08-03 22:11:42 +00:00
|
|
|
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts)
|
2011-03-13 13:09:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2017-04-21 14:20:35 +00:00
|
|
|
# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no
|
2017-08-03 22:11:42 +00:00
|
|
|
# set(TEST_BLENDER_EXE_BARE ${TEST_BLENDER_EXE})
|
|
|
|
# set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} ${TEST_BLENDER_EXE_PARAMS} )
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2011-03-18 23:58:13 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# GENERAL PYTHON CORRECTNESS TESTS
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_load_keymap
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2013-02-26 04:48:16 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_keymap_completeness.py
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_load_addons
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-03-18 23:58:13 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_load_addons.py
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_load_modules
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-03-18 23:58:13 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_load_py_modules.py
|
|
|
|
)
|
|
|
|
|
2011-03-22 14:09:07 +00:00
|
|
|
# test running operators doesn't segfault under various conditions
|
2014-03-26 20:30:22 +00:00
|
|
|
if(USE_EXPERIMENTAL_TESTS)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_run_operators
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2014-03-26 20:30:22 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_run_operators.py
|
|
|
|
)
|
|
|
|
endif()
|
2011-03-22 14:09:07 +00:00
|
|
|
|
2015-09-24 10:49:44 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# PY API TESTS
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_pyapi_bpy_path
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2015-09-24 10:49:44 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_path.py
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_pyapi_bpy_utils_units
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2015-09-24 10:49:44 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_utils_units.py
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_pyapi_mathutils
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-12-20 01:49:24 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_mathutils.py
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_pyapi_idprop
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2017-03-18 16:37:22 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_idprop.py
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME script_pyapi_idprop_datablock
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
Datablock ID Properties
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.
In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.
Original author: @artfunkel
Alexander (Blend4Web Team)
Reviewers: brecht, artfunkel, mont29, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne
Maniphest Tasks: T37754
Differential Revision: https://developer.blender.org/D113
2017-04-13 09:30:03 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_idprop_datablock.py
|
|
|
|
)
|
|
|
|
|
2014-02-02 18:29:08 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# MODELING TESTS
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME bevel
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2014-02-02 18:29:08 +00:00
|
|
|
${TEST_SRC_DIR}/modeling/bevel_regression.blend
|
|
|
|
--python-text run_tests
|
|
|
|
)
|
|
|
|
|
2018-02-12 12:23:23 +00:00
|
|
|
add_test(
|
|
|
|
NAME boolean
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
|
|
|
${TEST_SRC_DIR}/modeling/bool_regression.blend
|
|
|
|
--python-text run_tests
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME split_faces
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2017-06-08 20:45:21 +00:00
|
|
|
${TEST_SRC_DIR}/modeling/split_faces_test.blend
|
|
|
|
--python-text run_tests
|
2017-02-16 14:36:00 +00:00
|
|
|
)
|
|
|
|
|
2017-05-26 19:57:45 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# MODIFIERS TESTS
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME modifier_array
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2017-06-08 20:45:21 +00:00
|
|
|
${TEST_SRC_DIR}/modifier_stack/array_test.blend
|
|
|
|
--python-text run_tests
|
2017-05-26 19:57:45 +00:00
|
|
|
)
|
|
|
|
|
2011-03-18 23:58:13 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# IO TESTS
|
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# OBJ Import tests
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_obj_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/cube.obj'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=39cce4bacac2d1b18fc470380279bc15 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_obj_cube.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_obj_nurbs_cyclic
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/nurbs_cyclic.obj'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=ad3c307e5883224a0492378cd32691ab --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_obj_nurbs_cyclic.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_obj_makehuman
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/makehuman.obj'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=c9f78b185e58358daa4ecaecfa75464e --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_obj_makehuman.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# OBJ Export tests
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_obj_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_cube.obj',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_obj_cube.obj
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_obj_cube.mtl
|
2016-11-02 14:35:18 +00:00
|
|
|
--md5=e80660437ad9bfe082849641c361a233 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_obj_nurbs
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_nurbs.obj',use_selection=False,use_nurbs=True\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_obj_nurbs.obj
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_obj_nurbs.mtl
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=a733ae4fa4a591ea9b0912da3af042de --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_obj_all_objects
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_all_objects.obj',use_selection=False,use_nurbs=True\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_obj_all_objects.obj
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_obj_all_objects.mtl
|
2011-08-08 03:31:25 +00:00
|
|
|
--md5=04b3ed97cede07a19548fc518ce9f8ca --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
# PLY Import tests
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_ply_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/cube_ascii.ply'\)
|
|
|
|
--md5=527134343c27fc0ea73115b85fbfd3ac --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_ply_cube.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_ply_bunny
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/bunny2.ply'\)
|
|
|
|
--md5=6ea5b8533400a17accf928b8fd024eaa --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_ply_bunny.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_ply_small_holes
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/many_small_holes.ply'\)
|
|
|
|
--md5=c3093e26ecae5b6d59fbbcf2a0d0b39f --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_ply_small_holes.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2011-10-10 00:29:23 +00:00
|
|
|
# PLY Export
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_ply_cube_all_data
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/export_ply_cube_all_data.ply'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_ply_cube_all_data.ply
|
|
|
|
--md5=6adc3748ceae8298496f99d0e7e76c15 --md5_method=FILE
|
|
|
|
)
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_ply_suzanne_all_data
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/export_ply_suzanne_all_data.ply'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_ply_suzanne_all_data.ply
|
|
|
|
--md5=68ba23f02efd6511bfd093f45f703221 --md5_method=FILE
|
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-10-10 00:29:23 +00:00
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_ply_vertices # lame, add a better one
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/export_ply_vertices.ply'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_ply_vertices.ply
|
|
|
|
--md5=37faba0aa2014451b27f951afa92f870 --md5_method=FILE
|
|
|
|
)
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
# STL Import tests
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_stl_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/cube.stl'\)
|
|
|
|
--md5=8ceb5bb7e1cb5f4342fa1669988c66b4 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_stl_cube.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_stl_conrod
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/conrod.stl'\)
|
|
|
|
--md5=690a4b8eb9002dcd8631c5a575ea7348 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_stl_conrod.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_stl_knot_max_simplified
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/knot_max_simplified.stl'\)
|
|
|
|
--md5=baf82803f45a84ec4ddbad9cef57dd3e --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_stl_knot_max_simplified.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2011-10-10 00:29:23 +00:00
|
|
|
# STL Export
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_stl_cube_all_data
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/export_stl_cube_all_data.stl'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_stl_cube_all_data.stl
|
|
|
|
--md5=64cb97c0cabb015e1c3f76369835075a --md5_method=FILE
|
|
|
|
)
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_stl_suzanne_all_data
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/export_stl_suzanne_all_data.stl'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_stl_suzanne_all_data.stl
|
|
|
|
--md5=e9b23c97c139ad64961c635105bb9192 --md5_method=FILE
|
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_stl_vertices # lame, add a better one
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/export_stl_vertices.stl'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_stl_vertices.stl
|
|
|
|
--md5=3fd3c877e573beeebc782532cc005820 --md5_method=FILE
|
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# X3D Import
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_x3d_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/color_cube.x3d'\)
|
2011-07-01 13:39:35 +00:00
|
|
|
--md5=3fae9be004199c145941cd3f9f80ad7b --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_x3d_cube.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_x3d_teapot
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/teapot.x3d'\)
|
2011-07-01 13:39:35 +00:00
|
|
|
--md5=8ee196c71947dce4199d55698501691e --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_x3d_teapot.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_x3d_suzanne_material
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/suzanne_material.x3d'\)
|
2011-07-01 13:39:35 +00:00
|
|
|
--md5=3edea1353257d8b5a5f071942f417be6 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_x3d_suzanne_material.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# X3D Export
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_x3d_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_cube.x3d',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_x3d_cube.x3d
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=05312d278fe41da33560fdfb9bdb268f --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_x3d_nurbs
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_nurbs.x3d',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_x3d_nurbs.x3d
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=4286d4a2aa507ef78b22ddcbdcc88481 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_x3d_all_objects
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_all_objects.x3d',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_x3d_all_objects.x3d
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=f5f9fa4c5619a0eeab66685aafd2f7f0 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# 3DS Import
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_3ds_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/cube.3ds'\)
|
|
|
|
--md5=cb5a45c35a343c3f5beca2a918472951 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_3ds_cube.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_3ds_hierarchy_lara
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/hierarchy_lara.3ds'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=766c873d9fdb5f190e43796cfbae63b6 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_3ds_hierarchy_lara.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME import_3ds_hierarchy_greek_trireme
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/hierarchy_greek_trireme.3ds'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=b62ee30101e8999cb91ef4f8a8760056 --md5_method=SCENE
|
2011-04-06 00:46:06 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/import_3ds_hierarchy_greek_trireme.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# 3DS Export
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_3ds_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/export_3ds_cube.3ds',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_3ds_cube.3ds
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=a31f5071b6c6dc7445b9099cdc7f63b3 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_3ds_nurbs
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/export_3ds_nurbs.3ds',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_3ds_nurbs.3ds
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=5bdd21be3c80d814fbc83cb25edb08c2 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_3ds_all_objects
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/export_3ds_all_objects.3ds',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_3ds_all_objects.3ds
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=68447761ab0ca38e1e22e7c177ed48a8 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# FBX Export
|
|
|
|
# 'use_metadata=False' for reliable md5's
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_fbx_cube
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/export_fbx_cube.fbx',use_selection=False,use_metadata=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_fbx_cube.fbx
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=59a35577462f95f9a0b4e6035226ce9b --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_fbx_nurbs
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/export_fbx_nurbs.fbx',use_selection=False,use_metadata=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_fbx_nurbs.fbx
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=d31875f18f613fa0c3b16e978f87f6f8 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME export_fbx_all_objects
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/export_fbx_all_objects.fbx',use_selection=False,use_metadata=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/export_fbx_all_objects.fbx
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=b35eb2a9d0e73762ecae2278c25a38ac --md5_method=FILE
|
2011-01-21 00:33:37 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2015-01-22 10:53:49 +00:00
|
|
|
|
|
|
|
if(WITH_CYCLES)
|
2015-01-23 15:56:03 +00:00
|
|
|
if(OPENIMAGEIO_IDIFF AND EXISTS "${TEST_SRC_DIR}/cycles/ctests/shader")
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
macro(add_cycles_render_test subject)
|
|
|
|
if(MSVC)
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME cycles_${subject}_test
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
COMMAND
|
|
|
|
"$<TARGET_FILE_DIR:blender>/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$<CONFIG:Debug>:_d>"
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
|
|
|
|
-blender "$<TARGET_FILE:blender>"
|
|
|
|
-testdir "${TEST_SRC_DIR}/cycles/ctests/${subject}"
|
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
2017-08-03 14:41:50 +00:00
|
|
|
-outdir "${TEST_OUT_DIR}/cycles"
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
)
|
|
|
|
else()
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME cycles_${subject}_test
|
|
|
|
COMMAND ${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
|
|
|
|
-blender "$<TARGET_FILE:blender>"
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
-testdir "${TEST_SRC_DIR}/cycles/ctests/${subject}"
|
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
2017-08-03 14:41:50 +00:00
|
|
|
-outdir "${TEST_OUT_DIR}/cycles"
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
)
|
|
|
|
endif()
|
2017-02-10 13:08:12 +00:00
|
|
|
endmacro()
|
2017-02-10 13:52:54 +00:00
|
|
|
if(WITH_OPENGL_TESTS)
|
|
|
|
add_cycles_render_test(opengl)
|
|
|
|
endif()
|
2017-09-12 11:22:02 +00:00
|
|
|
add_cycles_render_test(bake)
|
2017-08-10 22:38:39 +00:00
|
|
|
add_cycles_render_test(denoise)
|
2017-08-07 12:31:40 +00:00
|
|
|
add_cycles_render_test(displacement)
|
|
|
|
add_cycles_render_test(image_data_types)
|
|
|
|
add_cycles_render_test(image_mapping)
|
|
|
|
add_cycles_render_test(image_texture_limit)
|
2017-08-18 15:09:12 +00:00
|
|
|
add_cycles_render_test(light)
|
2017-02-16 09:36:22 +00:00
|
|
|
add_cycles_render_test(mblur)
|
[Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons
1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.
This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there
5 has been fixed in rBL61751
Reviewers: juicyfruit, brecht, sergey
Reviewed By: sergey
Subscribers: Blendify
Tags: #cycles, #automated_testing
Differential Revision: https://developer.blender.org/D2367
2017-01-25 16:36:41 +00:00
|
|
|
add_cycles_render_test(reports)
|
|
|
|
add_cycles_render_test(render)
|
|
|
|
add_cycles_render_test(shader)
|
2017-08-30 15:42:00 +00:00
|
|
|
add_cycles_render_test(shader_tangent)
|
2017-08-07 12:31:40 +00:00
|
|
|
add_cycles_render_test(shadow_catcher)
|
2018-02-08 12:32:07 +00:00
|
|
|
add_cycles_render_test(sss)
|
2017-12-19 08:50:55 +00:00
|
|
|
add_cycles_render_test(texture_space)
|
2017-08-07 12:31:40 +00:00
|
|
|
add_cycles_render_test(volume)
|
2015-01-23 15:56:03 +00:00
|
|
|
else()
|
|
|
|
MESSAGE(STATUS "Disabling Cycles tests because tests folder does not exist")
|
2015-01-22 10:53:49 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
2017-04-14 10:54:20 +00:00
|
|
|
|
2017-04-22 17:03:59 +00:00
|
|
|
if(WITH_ALEMBIC)
|
2017-04-21 14:20:01 +00:00
|
|
|
find_package_wrapper(Alembic)
|
|
|
|
if(NOT ALEMBIC_FOUND)
|
|
|
|
message(FATAL_ERROR "Alembic is enabled but cannot be found")
|
|
|
|
endif()
|
|
|
|
get_filename_component(real_include_dir ${ALEMBIC_INCLUDE_DIR} REALPATH)
|
|
|
|
get_filename_component(ALEMBIC_ROOT_DIR ${real_include_dir} DIRECTORY)
|
|
|
|
|
2017-04-14 10:54:20 +00:00
|
|
|
if(MSVC)
|
2017-08-03 22:11:42 +00:00
|
|
|
# FIXME, de-duplicate.
|
|
|
|
add_test(
|
|
|
|
NAME alembic_tests
|
2017-04-14 10:54:20 +00:00
|
|
|
COMMAND
|
|
|
|
"$<TARGET_FILE_DIR:blender>/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$<CONFIG:Debug>:_d>"
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/alembic_tests.py
|
2017-04-28 13:28:41 +00:00
|
|
|
--blender "$<TARGET_FILE:blender>"
|
2017-04-14 10:54:20 +00:00
|
|
|
--testdir "${TEST_SRC_DIR}/alembic"
|
|
|
|
--alembic-root "${ALEMBIC_ROOT_DIR}"
|
|
|
|
)
|
|
|
|
else()
|
2017-08-03 22:11:42 +00:00
|
|
|
add_test(
|
|
|
|
NAME alembic_tests
|
|
|
|
COMMAND ${CMAKE_CURRENT_LIST_DIR}/alembic_tests.py
|
|
|
|
--blender "$<TARGET_FILE:blender>"
|
2017-04-14 10:54:20 +00:00
|
|
|
--testdir "${TEST_SRC_DIR}/alembic"
|
|
|
|
--alembic-root "${ALEMBIC_ROOT_DIR}"
|
|
|
|
)
|
2017-08-03 22:11:42 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_test(
|
|
|
|
NAME script_alembic_import
|
|
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS}
|
2017-06-04 23:05:59 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_import_test.py
|
|
|
|
--
|
|
|
|
--testdir "${TEST_SRC_DIR}/alembic"
|
2017-06-19 15:50:43 +00:00
|
|
|
--with-legacy-depsgraph=${WITH_LEGACY_DEPSGRAPH}
|
2017-08-03 22:11:42 +00:00
|
|
|
)
|
2017-04-14 10:54:20 +00:00
|
|
|
endif()
|