diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-15 14:12:50 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-15 14:12:59 +0300 |
commit | e30bc6f5175cb22037696649e4de618bbb20d87a (patch) | |
tree | 0b625c3c4fdccfcc5d523588393b745e2c203542 /tests/python | |
parent | 7e3d2a8baaca06965ee6a244ef124bc33c92b693 (diff) |
Layer Unittest: use macro for tests
Diffstat (limited to 'tests/python')
-rw-r--r-- | tests/python/render_layer/CMakeLists.txt | 74 |
1 files changed, 18 insertions, 56 deletions
diff --git a/tests/python/render_layer/CMakeLists.txt b/tests/python/render_layer/CMakeLists.txt index 04c8a4eea2a..0291801927d 100644 --- a/tests/python/render_layer/CMakeLists.txt +++ b/tests/python/render_layer/CMakeLists.txt @@ -14,7 +14,7 @@ # 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. +# Contributor(s): Jacques Beaurain, Dalai Felinto. # # ***** END GPL LICENSE BLOCK ***** @@ -22,10 +22,6 @@ # Use '--write-blend=/tmp/test.blend' to view output -# Some tests are interesting but take too long to run -# and don't give deterministic results -set(USE_EXPERIMENTAL_TESTS FALSE) - set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../lib/tests) set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests) @@ -48,59 +44,25 @@ else() endif() # for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no -set(TEST_BLENDER_EXE_BARE ${TEST_BLENDER_EXE}) set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background -noaudio --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts) # ------------------------------------------------------------------------------ -add_test(render_layer_scene_write_read ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_scene_write_read.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_scene_copy ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_scene_copy.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_syncing ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_syncing.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_layer_linking ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_layer_linking.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_active_collection ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_active_collection.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_object_delete ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_object_delete.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_link ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_link.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_operator_context ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_operator_context.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_object_add ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_object_add.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - -add_test(render_layer_object_copy ${TEST_BLENDER_EXE} - --python ${CMAKE_CURRENT_LIST_DIR}/test_object_copy.py -- - --testdir="${TEST_SRC_DIR}/layers" -) - +macro(RENDER_LAYER_TEST test_name) + add_test(render_layer_${test_name} ${TEST_BLENDER_EXE} + --python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py -- + --testdir="${TEST_SRC_DIR}/layers" + ) +endmacro() + +RENDER_LAYER_TEST(scene_write_read) +RENDER_LAYER_TEST(scene_copy) +RENDER_LAYER_TEST(layer_syncinc) +RENDER_LAYER_TEST(layer_linking) +RENDER_LAYER_TEST(active_collection) +RENDER_LAYER_TEST(object_delete) +RENDER_LAYER_TEST(link) +RENDER_LAYER_TEST(operator_context) +RENDER_LAYER_TEST(object_add) +RENDER_LAYER_TEST(object_copy) |