From 3b8d4aa25f23f1c4c1d9a42e6c876333c4f2c6d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 18 Mar 2011 23:58:13 +0000 Subject: 2 tests for ctest. - script_load_addons: loads and onloads all addons, error if any cant be enabled or disabled. - script_load_modules: loads all blenders modules, error if any modules raise an exception or if any modules in the scripts dir are not tested (except for presets and templates). These are useful because lazy module loading means a module can have an error which isnt raised until the tools used. This gives a way to detect basic errors that used to happen on startup or when enabling the addon. --- source/tests/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/tests/CMakeLists.txt') diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt index a341caac1d0..e9837dd354f 100644 --- a/source/tests/CMakeLists.txt +++ b/source/tests/CMakeLists.txt @@ -44,6 +44,20 @@ endif() set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} --background --factory-startup --env-system-scripts ${CMAKE_SOURCE_DIR}/release/scripts) + +# ------------------------------------------------------------------------------ +# GENERAL PYTHON CORRECTNESS TESTS +add_test(script_load_addons ${TEST_BLENDER_EXE} + --python ${CMAKE_CURRENT_LIST_DIR}/bl_load_addons.py +) + +add_test(script_load_modules ${TEST_BLENDER_EXE} + --python ${CMAKE_CURRENT_LIST_DIR}/bl_load_py_modules.py +) + +# ------------------------------------------------------------------------------ +# IO TESTS + # OBJ Import tests add_test(import_obj_cube ${TEST_BLENDER_EXE} --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py -- -- cgit v1.2.3