2017-02-14 18:15:09 +01: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.
|
|
|
|
#
|
2017-02-15 12:12:50 +01:00
|
|
|
# Contributor(s): Jacques Beaurain, Dalai Felinto.
|
2017-02-14 18:15:09 +01:00
|
|
|
#
|
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
|
|
|
# --env-system-scripts allows to run without the install target.
|
|
|
|
|
|
|
|
# Use '--write-blend=/tmp/test.blend' to view output
|
|
|
|
|
|
|
|
set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../lib/tests)
|
|
|
|
set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
|
|
|
|
|
|
|
|
# ugh, any better way to do this on testing only?
|
|
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
|
|
|
|
|
|
|
|
#~ if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
|
|
|
|
#~ message(FATAL_ERROR "CMake test directory not found!")
|
|
|
|
#~ endif()
|
|
|
|
|
|
|
|
# all calls to blender use this
|
|
|
|
if(APPLE)
|
|
|
|
if(${CMAKE_GENERATOR} MATCHES "Xcode")
|
|
|
|
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/Debug/blender.app/Contents/MacOS/blender)
|
|
|
|
else()
|
|
|
|
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender.app/Contents/MacOS/blender)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no
|
|
|
|
set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background -noaudio --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts)
|
|
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2017-02-15 12:12:50 +01:00
|
|
|
macro(RENDER_LAYER_TEST test_name)
|
2017-04-07 17:50:47 +02:00
|
|
|
# Adds ${CMAKE_CURRENT_LIST_DIR} to sys.path so that the tests can import
|
|
|
|
# things from render_layer_common.py
|
2017-02-15 12:12:50 +01:00
|
|
|
add_test(render_layer_${test_name} ${TEST_BLENDER_EXE}
|
2017-04-07 17:50:47 +02:00
|
|
|
--python-expr "import sys; sys.path.append('${CMAKE_CURRENT_LIST_DIR}')"
|
2017-04-10 10:03:02 +02:00
|
|
|
--python-exit-code 1
|
2017-02-15 12:12:50 +01:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py --
|
|
|
|
--testdir="${TEST_SRC_DIR}/layers"
|
|
|
|
)
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
RENDER_LAYER_TEST(active_collection)
|
2017-03-02 09:37:10 +01:00
|
|
|
RENDER_LAYER_TEST(collection_rename)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_a)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_b)
|
2017-03-20 18:06:50 +01:00
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_c)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_d)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_e)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_f)
|
2017-04-03 18:42:01 +02:00
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_g)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_h)
|
|
|
|
RENDER_LAYER_TEST(evaluation_visibility_i)
|
2017-03-20 18:06:50 +01:00
|
|
|
RENDER_LAYER_TEST(evaluation_selectability_a)
|
|
|
|
RENDER_LAYER_TEST(evaluation_selectability_b)
|
|
|
|
RENDER_LAYER_TEST(evaluation_selectability_c)
|
|
|
|
RENDER_LAYER_TEST(evaluation_selectability_d)
|
|
|
|
RENDER_LAYER_TEST(evaluation_selectability_e)
|
2017-04-03 17:45:20 +02:00
|
|
|
RENDER_LAYER_TEST(evaluation_selectability_f)
|
2017-02-23 12:26:48 +01:00
|
|
|
RENDER_LAYER_TEST(object_add_cylinder)
|
|
|
|
RENDER_LAYER_TEST(object_add_empty)
|
|
|
|
RENDER_LAYER_TEST(object_add_torus)
|
2017-02-23 12:35:14 +01:00
|
|
|
RENDER_LAYER_TEST(object_add_no_collection_cylinder)
|
|
|
|
RENDER_LAYER_TEST(object_add_no_collection_empty)
|
|
|
|
RENDER_LAYER_TEST(object_add_no_collection_torus)
|
2017-02-15 12:12:50 +01:00
|
|
|
RENDER_LAYER_TEST(object_copy)
|
2017-04-03 17:45:20 +02:00
|
|
|
RENDER_LAYER_TEST(object_delete_a)
|
|
|
|
RENDER_LAYER_TEST(object_delete_b)
|
2017-03-02 09:37:10 +01:00
|
|
|
RENDER_LAYER_TEST(object_link_a)
|
|
|
|
RENDER_LAYER_TEST(object_link_b)
|
|
|
|
RENDER_LAYER_TEST(object_link_c)
|
|
|
|
RENDER_LAYER_TEST(operator_context)
|
2017-03-03 16:14:21 +01:00
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_a)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_b)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_c)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_d)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_e)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_f)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_g)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_h)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_i)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_a)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_b)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_c)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_d)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_e)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_f)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_g)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_h)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_scene_collection_sync_i)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_a)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_b)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_c)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_d)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_e)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_f)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_g)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_h)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_i)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_j)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_k)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_l)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_a)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_b)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_c)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_d)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_e)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_f)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_g)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_h)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_i)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_j)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_k)
|
|
|
|
RENDER_LAYER_TEST(move_into_scene_collection_sync_l)
|
2017-03-08 17:21:43 +01:00
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_a)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_b)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_c)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_d)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_e)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_f)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_g)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_h)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_i)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_j)
|
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_k)
|
2017-03-10 16:48:09 +01:00
|
|
|
RENDER_LAYER_TEST(move_above_below_layer_collection_l)
|
2017-03-08 17:21:43 +01:00
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_a)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_b)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_c)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_d)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_e)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_f)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_g)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_h)
|
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_i)
|
2017-03-13 17:35:58 +01:00
|
|
|
RENDER_LAYER_TEST(move_into_layer_collection_j)
|
2017-03-02 09:37:10 +01:00
|
|
|
RENDER_LAYER_TEST(layer_linking)
|
2017-04-10 10:08:29 +02:00
|
|
|
RENDER_LAYER_TEST(layer_syncing)
|
2017-03-31 17:26:33 +02:00
|
|
|
RENDER_LAYER_TEST(scene_copy_a)
|
|
|
|
RENDER_LAYER_TEST(scene_copy_b)
|
|
|
|
RENDER_LAYER_TEST(scene_copy_c)
|
|
|
|
RENDER_LAYER_TEST(scene_copy_d)
|
2017-03-02 09:37:10 +01:00
|
|
|
RENDER_LAYER_TEST(scene_write_read)
|