Cleanup: remove contributors for CMake files
[blender.git] / tests / python / view_layer / 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 # ***** END GPL LICENSE BLOCK *****
17
18 # --env-system-scripts allows to run without the install target.
19
20 # Use '--write-blend=/tmp/test.blend' to view output
21
22 set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../lib/tests)
23 set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
24
25 # ugh, any better way to do this on testing only?
26 execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR})
27
28 #~      if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
29 #~              message(FATAL_ERROR "CMake test directory not found!")
30 #~      endif()
31
32 # all calls to blender use this
33 if(APPLE)
34         if(${CMAKE_GENERATOR} MATCHES "Xcode")
35                 set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/Debug/blender.app/Contents/MacOS/blender)
36         else()
37                 set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender.app/Contents/MacOS/blender)
38         endif()
39 else()
40         set(TEST_BLENDER_EXE ${EXECUTABLE_OUTPUT_PATH}/blender)
41 endif()
42
43 # for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no
44 set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background -noaudio --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts)
45
46
47 # ------------------------------------------------------------------------------
48
49 macro(VIEW_LAYER_TEST test_name)
50         # Adds ${CMAKE_CURRENT_LIST_DIR} to sys.path so that the tests can import
51         # things from view_layer_common.py
52         add_test(view_layer_${test_name} ${TEST_BLENDER_EXE}
53                 --python-expr "import sys; sys.path.append('${CMAKE_CURRENT_LIST_DIR}')"
54                 --python-exit-code 1
55                 --python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py --
56                 --testdir="${TEST_SRC_DIR}/layers"
57         )
58 endmacro()
59
60 VIEW_LAYER_TEST(active_collection)
61 VIEW_LAYER_TEST(background_set)
62 VIEW_LAYER_TEST(collection_new_sync)
63 VIEW_LAYER_TEST(collection_rename_a)
64 VIEW_LAYER_TEST(collection_rename_b)
65 #VIEW_LAYER_TEST(evaluation_render_settings_a)
66 #VIEW_LAYER_TEST(evaluation_render_settings_b)
67 #VIEW_LAYER_TEST(evaluation_render_settings_c)
68 #VIEW_LAYER_TEST(evaluation_render_settings_d)
69 #VIEW_LAYER_TEST(evaluation_render_settings_e)
70 #VIEW_LAYER_TEST(evaluation_render_settings_f)
71 #VIEW_LAYER_TEST(evaluation_render_settings_g)
72 #VIEW_LAYER_TEST(evaluation_render_settings_h)
73 #VIEW_LAYER_TEST(evaluation_render_settings_i)
74 VIEW_LAYER_TEST(evaluation_visibility_a)
75 VIEW_LAYER_TEST(evaluation_visibility_b)
76 VIEW_LAYER_TEST(evaluation_visibility_c)
77 VIEW_LAYER_TEST(evaluation_visibility_d)
78 VIEW_LAYER_TEST(evaluation_visibility_e)
79 VIEW_LAYER_TEST(evaluation_visibility_f)
80 VIEW_LAYER_TEST(evaluation_visibility_g)
81 VIEW_LAYER_TEST(evaluation_visibility_h)
82 VIEW_LAYER_TEST(evaluation_visibility_i)
83 VIEW_LAYER_TEST(evaluation_visibility_j)
84 VIEW_LAYER_TEST(evaluation_selectability_a)
85 VIEW_LAYER_TEST(evaluation_selectability_b)
86 VIEW_LAYER_TEST(evaluation_selectability_c)
87 VIEW_LAYER_TEST(evaluation_selectability_d)
88 VIEW_LAYER_TEST(evaluation_selectability_e)
89 VIEW_LAYER_TEST(evaluation_selectability_f)
90 VIEW_LAYER_TEST(group_a)
91 VIEW_LAYER_TEST(group_b)
92 VIEW_LAYER_TEST(group_c)
93 VIEW_LAYER_TEST(group_d)
94 VIEW_LAYER_TEST(group_e)
95 VIEW_LAYER_TEST(object_add_cylinder)
96 VIEW_LAYER_TEST(object_add_empty)
97 VIEW_LAYER_TEST(object_add_torus)
98 VIEW_LAYER_TEST(object_add_no_collection_cylinder)
99 VIEW_LAYER_TEST(object_add_no_collection_empty)
100 VIEW_LAYER_TEST(object_add_no_collection_torus)
101 VIEW_LAYER_TEST(object_copy)
102 VIEW_LAYER_TEST(object_delete_a)
103 VIEW_LAYER_TEST(object_delete_b)
104 VIEW_LAYER_TEST(object_link_a)
105 VIEW_LAYER_TEST(object_link_b)
106 VIEW_LAYER_TEST(object_link_c)
107 VIEW_LAYER_TEST(operator_context)
108 VIEW_LAYER_TEST(make_single_user)
109 VIEW_LAYER_TEST(move_above_below_scene_collection_a)
110 VIEW_LAYER_TEST(move_above_below_scene_collection_b)
111 VIEW_LAYER_TEST(move_above_below_scene_collection_c)
112 VIEW_LAYER_TEST(move_above_below_scene_collection_d)
113 VIEW_LAYER_TEST(move_above_below_scene_collection_e)
114 VIEW_LAYER_TEST(move_above_below_scene_collection_f)
115 VIEW_LAYER_TEST(move_above_below_scene_collection_g)
116 VIEW_LAYER_TEST(move_above_below_scene_collection_h)
117 VIEW_LAYER_TEST(move_above_below_scene_collection_i)
118 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_a)
119 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_b)
120 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_c)
121 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_d)
122 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_e)
123 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_f)
124 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_g)
125 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_h)
126 VIEW_LAYER_TEST(move_above_below_scene_collection_sync_i)
127 VIEW_LAYER_TEST(move_into_scene_collection_a)
128 VIEW_LAYER_TEST(move_into_scene_collection_b)
129 VIEW_LAYER_TEST(move_into_scene_collection_c)
130 VIEW_LAYER_TEST(move_into_scene_collection_d)
131 VIEW_LAYER_TEST(move_into_scene_collection_e)
132 VIEW_LAYER_TEST(move_into_scene_collection_f)
133 VIEW_LAYER_TEST(move_into_scene_collection_g)
134 VIEW_LAYER_TEST(move_into_scene_collection_h)
135 VIEW_LAYER_TEST(move_into_scene_collection_i)
136 VIEW_LAYER_TEST(move_into_scene_collection_j)
137 VIEW_LAYER_TEST(move_into_scene_collection_k)
138 VIEW_LAYER_TEST(move_into_scene_collection_l)
139 VIEW_LAYER_TEST(move_into_scene_collection_sync_a)
140 VIEW_LAYER_TEST(move_into_scene_collection_sync_b)
141 VIEW_LAYER_TEST(move_into_scene_collection_sync_c)
142 VIEW_LAYER_TEST(move_into_scene_collection_sync_d)
143 VIEW_LAYER_TEST(move_into_scene_collection_sync_e)
144 VIEW_LAYER_TEST(move_into_scene_collection_sync_f)
145 VIEW_LAYER_TEST(move_into_scene_collection_sync_g)
146 VIEW_LAYER_TEST(move_into_scene_collection_sync_h)
147 VIEW_LAYER_TEST(move_into_scene_collection_sync_i)
148 VIEW_LAYER_TEST(move_into_scene_collection_sync_j)
149 VIEW_LAYER_TEST(move_into_scene_collection_sync_k)
150 VIEW_LAYER_TEST(move_into_scene_collection_sync_l)
151 VIEW_LAYER_TEST(move_above_below_layer_collection_a)
152 VIEW_LAYER_TEST(move_above_below_layer_collection_b)
153 VIEW_LAYER_TEST(move_above_below_layer_collection_c)
154 VIEW_LAYER_TEST(move_above_below_layer_collection_d)
155 VIEW_LAYER_TEST(move_above_below_layer_collection_e)
156 VIEW_LAYER_TEST(move_above_below_layer_collection_f)
157 VIEW_LAYER_TEST(move_above_below_layer_collection_g)
158 VIEW_LAYER_TEST(move_above_below_layer_collection_h)
159 VIEW_LAYER_TEST(move_above_below_layer_collection_i)
160 VIEW_LAYER_TEST(move_above_below_layer_collection_j)
161 VIEW_LAYER_TEST(move_above_below_layer_collection_k)
162 VIEW_LAYER_TEST(move_above_below_layer_collection_l)
163 VIEW_LAYER_TEST(move_into_layer_collection_a)
164 VIEW_LAYER_TEST(move_into_layer_collection_b)
165 VIEW_LAYER_TEST(move_into_layer_collection_c)
166 VIEW_LAYER_TEST(move_into_layer_collection_d)
167 VIEW_LAYER_TEST(move_into_layer_collection_e)
168 VIEW_LAYER_TEST(move_into_layer_collection_f)
169 VIEW_LAYER_TEST(move_into_layer_collection_g)
170 VIEW_LAYER_TEST(move_into_layer_collection_h)
171 VIEW_LAYER_TEST(move_into_layer_collection_i)
172 VIEW_LAYER_TEST(move_into_layer_collection_j)
173 VIEW_LAYER_TEST(layer_linking)
174 VIEW_LAYER_TEST(layer_syncing)
175 VIEW_LAYER_TEST(scene_collection_delete)
176 VIEW_LAYER_TEST(scene_copy_a)
177 VIEW_LAYER_TEST(scene_copy_b)
178 VIEW_LAYER_TEST(scene_copy_c)
179 VIEW_LAYER_TEST(scene_copy_d)
180 VIEW_LAYER_TEST(scene_copy_e)
181 VIEW_LAYER_TEST(scene_copy_f)
182 VIEW_LAYER_TEST(scene_delete)
183 VIEW_LAYER_TEST(scene_objects)
184 VIEW_LAYER_TEST(scene_write_read)
185 VIEW_LAYER_TEST(view_layer_rename)