This commit implements described in the #104573. The goal is to fix the confusion of the submodule hashes change, which are not ideal for any of the supported git-module configuration (they are either always visible causing confusion, or silently staged and committed, also causing confusion). This commit replaces submodules with a checkout of addons and addons_contrib, covered by the .gitignore, and locale and developer tools are moved to the main repository. This also changes the paths: - /release/scripts are moved to the /scripts - /source/tools are moved to the /tools - /release/datafiles/locale is moved to /locale This is done to avoid conflicts when using bisect, and also allow buildbot to automatically "recover" wgen building older or newer branches/patches. Running `make update` will initialize the local checkout to the changed repository configuration. Another aspect of the change is that the make update will support Github style of remote organization (origin remote pointing to thy fork, upstream remote pointing to the upstream blender/blender.git). Pull Request #104755
52 lines
2.0 KiB
CMake
52 lines
2.0 KiB
CMake
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# --env-system-scripts allows to run without the install target.
|
|
|
|
# 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)
|
|
|
|
# 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_PARAMS --background -noaudio --factory-startup --debug-memory --debug-exit-on-error)
|
|
else()
|
|
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
|
|
endif()
|
|
else()
|
|
set(TEST_BLENDER_EXE_PARAMS --background -noaudio --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts)
|
|
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} ${TEST_BLENDER_EXE_PARAMS} )
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# GENERAL PYTHON CORRECTNESS TESTS
|
|
macro(COLLADA_TEST module test_name blend_file)
|
|
add_test(
|
|
NAME collada_${module}_${test_name}
|
|
COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS} ${TEST_SRC_DIR}/collada/${module}/${blend_file}
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/${module}/test_${module}_${test_name}.py --
|
|
--testdir ${TEST_SRC_DIR}/collada/${module}
|
|
)
|
|
endmacro()
|
|
|
|
# Tests are disabled because they only work on Windows
|
|
# Tests will be redone completely to work reliable
|
|
#
|
|
# collada_test(mesh simple mesh_simple.blend)
|
|
# collada_test(animation simple suzannes_parent_inverse.blend)
|