Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-09 20:20:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-09 20:20:00 +0400
commit13465fd81782451cdc12a6ac452064502c8fe1bf (patch)
treeeabd9eb1c1b6f9e59cf20441826ff7bc41bff449 /source/tests
parent10082b798625a6797ea48a6ffeb904951368297b (diff)
update for tests, error out when duplicate modules are found, all ctest tests pass again.
Diffstat (limited to 'source/tests')
-rw-r--r--source/tests/CMakeLists.txt4
-rw-r--r--source/tests/bl_load_py_modules.py11
2 files changed, 13 insertions, 2 deletions
diff --git a/source/tests/CMakeLists.txt b/source/tests/CMakeLists.txt
index 7abac7b9739..48053aa9d96 100644
--- a/source/tests/CMakeLists.txt
+++ b/source/tests/CMakeLists.txt
@@ -111,7 +111,7 @@ add_test(export_obj_all_objects ${TEST_BLENDER_EXE}
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_all_objects.obj',use_selection=False,use_nurbs=True\)
--md5_source=${TEST_OUT_DIR}/export_obj_all_objects.obj
--md5_source=${TEST_OUT_DIR}/export_obj_all_objects.mtl
- --md5=d06bd49e6c084e4e3348fa397a88790c --md5_method=FILE
+ --md5=01c123948efadc6a71ab2c09a5925756 --md5_method=FILE
)
@@ -212,7 +212,7 @@ add_test(export_x3d_all_objects ${TEST_BLENDER_EXE}
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/export_x3d_all_objects.x3d',use_selection=False\)
--md5_source=${TEST_OUT_DIR}/export_x3d_all_objects.x3d
- --md5=cef017805f684f27c311fdf4ba87462a --md5_method=FILE
+ --md5=d7d6574e833f3f051b65ef4577485fa9 --md5_method=FILE
)
diff --git a/source/tests/bl_load_py_modules.py b/source/tests/bl_load_py_modules.py
index 5a65578d8d3..a88edd5f1fe 100644
--- a/source/tests/bl_load_py_modules.py
+++ b/source/tests/bl_load_py_modules.py
@@ -65,6 +65,10 @@ def load_modules():
# paths blender stores scripts in.
paths = bpy.utils.script_paths()
+ print("Paths:")
+ for script_path in paths:
+ print("\t'%s'" % script_path)
+
#
# find all sys.path we added
for script_path in paths:
@@ -74,11 +78,18 @@ def load_modules():
#
# collect modules from our paths.
+ module_names = set()
for mod_dir in module_paths:
# print("mod_dir", mod_dir)
for mod, mod_full in bpy.path.module_names(mod_dir):
+ if mod in module_names:
+ raise Exception("Module found twice %r" % mod)
+
modules.append(__import__(mod))
+ module_names.add(mod)
+ del module_names
+
#
# now submodules
for m in modules: