Files
test/tests/python/view_layer/CMakeLists.txt
Sergey Sharybin bbfc97ad6f Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
2025-05-05 15:10:22 +02:00

168 lines
6.7 KiB
CMake

# SPDX-FileCopyrightText: 2017-2023 Blender Authors
#
# 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
set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/tests/files)
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()
# For testing with VALGRIND prefix: `valgrind --track-origins=yes --error-limit=no`
set(TEST_BLENDER_EXE
$<TARGET_FILE:blender>
--background
--factory-startup
--debug-memory
--debug-exit-on-error
--env-system-scripts ${CMAKE_SOURCE_DIR}/scripts
)
# ------------------------------------------------------------------------------
macro(view_layer_test test_name)
# Adds ${CMAKE_CURRENT_LIST_DIR} to sys.path so that the tests can import
# things from view_layer_common.py
add_test(view_layer_${test_name} ${TEST_BLENDER_EXE}
--python-expr "import sys; sys.path.append('${CMAKE_CURRENT_LIST_DIR}')"
--python-exit-code 1
--python ${CMAKE_CURRENT_LIST_DIR}/test_${test_name}.py --
--testdir="${TEST_SRC_DIR}/layers"
)
endmacro()
view_layer_test(active_collection)
view_layer_test(background_set)
view_layer_test(collection_new_sync)
view_layer_test(collection_rename_a)
view_layer_test(collection_rename_b)
# view_layer_test(evaluation_render_settings_a)
# view_layer_test(evaluation_render_settings_b)
# view_layer_test(evaluation_render_settings_c)
# view_layer_test(evaluation_render_settings_d)
# view_layer_test(evaluation_render_settings_e)
# view_layer_test(evaluation_render_settings_f)
# view_layer_test(evaluation_render_settings_g)
# view_layer_test(evaluation_render_settings_h)
# view_layer_test(evaluation_render_settings_i)
view_layer_test(evaluation_visibility_a)
view_layer_test(evaluation_visibility_b)
view_layer_test(evaluation_visibility_c)
view_layer_test(evaluation_visibility_d)
view_layer_test(evaluation_visibility_e)
view_layer_test(evaluation_visibility_f)
view_layer_test(evaluation_visibility_g)
view_layer_test(evaluation_visibility_h)
view_layer_test(evaluation_visibility_i)
view_layer_test(evaluation_visibility_j)
view_layer_test(evaluation_selectability_a)
view_layer_test(evaluation_selectability_b)
view_layer_test(evaluation_selectability_c)
view_layer_test(evaluation_selectability_d)
view_layer_test(evaluation_selectability_e)
view_layer_test(evaluation_selectability_f)
view_layer_test(group_a)
view_layer_test(group_b)
view_layer_test(group_c)
view_layer_test(group_d)
view_layer_test(group_e)
view_layer_test(object_add_cylinder)
view_layer_test(object_add_empty)
view_layer_test(object_add_torus)
view_layer_test(object_add_no_collection_cylinder)
view_layer_test(object_add_no_collection_empty)
view_layer_test(object_add_no_collection_torus)
view_layer_test(object_copy)
view_layer_test(object_delete_a)
view_layer_test(object_delete_b)
view_layer_test(object_link_a)
view_layer_test(object_link_b)
view_layer_test(object_link_c)
view_layer_test(operator_context)
view_layer_test(make_single_user)
view_layer_test(move_above_below_scene_collection_a)
view_layer_test(move_above_below_scene_collection_b)
view_layer_test(move_above_below_scene_collection_c)
view_layer_test(move_above_below_scene_collection_d)
view_layer_test(move_above_below_scene_collection_e)
view_layer_test(move_above_below_scene_collection_f)
view_layer_test(move_above_below_scene_collection_g)
view_layer_test(move_above_below_scene_collection_h)
view_layer_test(move_above_below_scene_collection_i)
view_layer_test(move_above_below_scene_collection_sync_a)
view_layer_test(move_above_below_scene_collection_sync_b)
view_layer_test(move_above_below_scene_collection_sync_c)
view_layer_test(move_above_below_scene_collection_sync_d)
view_layer_test(move_above_below_scene_collection_sync_e)
view_layer_test(move_above_below_scene_collection_sync_f)
view_layer_test(move_above_below_scene_collection_sync_g)
view_layer_test(move_above_below_scene_collection_sync_h)
view_layer_test(move_above_below_scene_collection_sync_i)
view_layer_test(move_into_scene_collection_a)
view_layer_test(move_into_scene_collection_b)
view_layer_test(move_into_scene_collection_c)
view_layer_test(move_into_scene_collection_d)
view_layer_test(move_into_scene_collection_e)
view_layer_test(move_into_scene_collection_f)
view_layer_test(move_into_scene_collection_g)
view_layer_test(move_into_scene_collection_h)
view_layer_test(move_into_scene_collection_i)
view_layer_test(move_into_scene_collection_j)
view_layer_test(move_into_scene_collection_k)
view_layer_test(move_into_scene_collection_l)
view_layer_test(move_into_scene_collection_sync_a)
view_layer_test(move_into_scene_collection_sync_b)
view_layer_test(move_into_scene_collection_sync_c)
view_layer_test(move_into_scene_collection_sync_d)
view_layer_test(move_into_scene_collection_sync_e)
view_layer_test(move_into_scene_collection_sync_f)
view_layer_test(move_into_scene_collection_sync_g)
view_layer_test(move_into_scene_collection_sync_h)
view_layer_test(move_into_scene_collection_sync_i)
view_layer_test(move_into_scene_collection_sync_j)
view_layer_test(move_into_scene_collection_sync_k)
view_layer_test(move_into_scene_collection_sync_l)
view_layer_test(move_above_below_layer_collection_a)
view_layer_test(move_above_below_layer_collection_b)
view_layer_test(move_above_below_layer_collection_c)
view_layer_test(move_above_below_layer_collection_d)
view_layer_test(move_above_below_layer_collection_e)
view_layer_test(move_above_below_layer_collection_f)
view_layer_test(move_above_below_layer_collection_g)
view_layer_test(move_above_below_layer_collection_h)
view_layer_test(move_above_below_layer_collection_i)
view_layer_test(move_above_below_layer_collection_j)
view_layer_test(move_above_below_layer_collection_k)
view_layer_test(move_above_below_layer_collection_l)
view_layer_test(move_into_layer_collection_a)
view_layer_test(move_into_layer_collection_b)
view_layer_test(move_into_layer_collection_c)
view_layer_test(move_into_layer_collection_d)
view_layer_test(move_into_layer_collection_e)
view_layer_test(move_into_layer_collection_f)
view_layer_test(move_into_layer_collection_g)
view_layer_test(move_into_layer_collection_h)
view_layer_test(move_into_layer_collection_i)
view_layer_test(move_into_layer_collection_j)
view_layer_test(layer_linking)
view_layer_test(layer_syncing)
view_layer_test(scene_collection_delete)
view_layer_test(scene_copy_a)
view_layer_test(scene_copy_b)
view_layer_test(scene_copy_c)
view_layer_test(scene_copy_d)
view_layer_test(scene_copy_e)
view_layer_test(scene_copy_f)
view_layer_test(scene_delete)
view_layer_test(scene_objects)
view_layer_test(scene_write_read)
view_layer_test(view_layer_rename)