CMakeLists.txt 7.4 KB

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