[Bf-blender-cvs] [0eb060c] master: Move tests into tests/ top-level dir

Campbell Barton noreply at git.blender.org
Wed Jun 18 14:04:11 CEST 2014


Commit: 0eb060c7b4fb3a85b14c9efca85a7a361640a95e
Author: Campbell Barton
Date:   Wed Jun 18 21:44:40 2014 +1000
https://developer.blender.org/rB0eb060c7b4fb3a85b14c9efca85a7a361640a95e

Move tests into tests/ top-level dir

===================================================================

M	CMakeLists.txt
M	GNUmakefile
M	source/CMakeLists.txt
D	source/tests/CMakeLists.txt
D	source/tests/batch_import.py
D	source/tests/bl_keymap_completeness.py
D	source/tests/bl_load_addons.py
D	source/tests/bl_load_py_modules.py
D	source/tests/bl_mesh_modifiers.py
D	source/tests/bl_mesh_validate.py
D	source/tests/bl_pyapi_mathutils.py
D	source/tests/bl_pyapi_units.py
D	source/tests/bl_rna_wiki_reference.py
D	source/tests/bl_rst_completeness.py
D	source/tests/bl_run_operators.py
D	source/tests/bl_test.py
D	source/tests/check_deprecated.py
D	source/tests/pep8.py
D	source/tests/rna_array.py
D	source/tests/rna_info_dump.py
D	source/tests/rst_to_doctree_mini.py
A	tests/CMakeLists.txt
A	tests/check_deprecated.py
A	tests/python/CMakeLists.txt
A	tests/python/batch_import.py
A	tests/python/bl_keymap_completeness.py
A	tests/python/bl_load_addons.py
A	tests/python/bl_load_py_modules.py
A	tests/python/bl_mesh_modifiers.py
A	tests/python/bl_mesh_validate.py
A	tests/python/bl_pyapi_mathutils.py
A	tests/python/bl_pyapi_units.py
A	tests/python/bl_rna_wiki_reference.py
A	tests/python/bl_rst_completeness.py
A	tests/python/bl_run_operators.py
A	tests/python/bl_test.py
A	tests/python/pep8.py
A	tests/python/rna_array.py
A	tests/python/rna_info_dump.py
A	tests/python/rst_to_doctree_mini.py

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a46c0a1..5593820 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2354,6 +2354,12 @@ if(WITH_PLAYER)
 	add_subdirectory(source/blenderplayer)
 endif()
 
+
+#-----------------------------------------------------------------------------
+# Testing
+add_subdirectory(tests)
+
+
 #-----------------------------------------------------------------------------
 # CPack for generating packages
 include(build_files/cmake/packaging.cmake)
diff --git a/GNUmakefile b/GNUmakefile
index 4f76cb3..c780772 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -223,7 +223,7 @@ test:
 
 # run pep8 check check on scripts we distribute.
 test_pep8:
-	python3 source/tests/pep8.py > test_pep8.log 2>&1
+	python3 tests/python/pep8.py > test_pep8.log 2>&1
 	@echo "written: test_pep8.log"
 
 # run some checks on our cmakefiles.
@@ -233,7 +233,7 @@ test_cmake:
 
 # run deprecation tests, see if we have anything to remove.
 test_deprecated:
-	python3 source/tests/check_deprecated.py
+	python3 tests/check_deprecated.py
 
 test_style_c:
 	# run our own checks on C/C++ style
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 391fdf4..c696719 100644
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -29,4 +29,3 @@ if(WITH_GAMEENGINE)
 	add_subdirectory(gameengine)
 endif()
 
-add_subdirectory(tests)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..78262f5
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,4 @@
+
+# Python CTests
+add_subdirectory(python)
+
diff --git a/source/tests/check_deprecated.py b/tests/check_deprecated.py
similarity index 97%
rename from source/tests/check_deprecated.py
rename to tests/check_deprecated.py
index bb9fcd8..d719315 100644
--- a/source/tests/check_deprecated.py
+++ b/tests/check_deprecated.py
@@ -25,7 +25,7 @@ DEPRECATE_DAYS = 120
 
 SKIP_DIRS = ("extern",
              "scons",
-             os.path.join("source", "tests"),  # not this dir
+             "tests",  # not this dir
              )
 
 
@@ -76,7 +76,7 @@ def deprecations():
 
     """
     import datetime
-    SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
+    SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))))
 
     SKIP_DIRS_ABS = [os.path.join(SOURCE_DIR, p) for p in SKIP_DIRS]
 
diff --git a/source/tests/CMakeLists.txt b/tests/python/CMakeLists.txt
similarity index 100%
rename from source/tests/CMakeLists.txt
rename to tests/python/CMakeLists.txt
diff --git a/source/tests/batch_import.py b/tests/python/batch_import.py
similarity index 96%
rename from source/tests/batch_import.py
rename to tests/python/batch_import.py
index a2c5fb5..dea08b4 100644
--- a/source/tests/batch_import.py
+++ b/tests/python/batch_import.py
@@ -21,21 +21,21 @@
 """
 Example Usage:
 
-./blender.bin --background --python source/tests/batch_import.py -- \
+./blender.bin --background --python tests/python/batch_import.py -- \
     --operator="bpy.ops.import_scene.obj" \
     --path="/fe/obj" \
     --match="*.obj" \
     --start=0 --end=10 \
     --save_path=/tmp/test
 
-./blender.bin --background --python source/tests/batch_import.py -- \
+./blender.bin --background --python tests/python/batch_import.py -- \
     --operator="bpy.ops.import_scene.autodesk_3ds" \
     --path="/fe/" \
     --match="*.3ds" \
     --start=0 --end=1000 \
     --save_path=/tmp/test
 
-./blender.bin --background --addons io_curve_svg --python source/tests/batch_import.py -- \
+./blender.bin --background --addons io_curve_svg --python tests/python/batch_import.py -- \
     --operator="bpy.ops.import_curve.svg" \
     --path="/usr/" \
     --match="*.svg" \
diff --git a/source/tests/bl_keymap_completeness.py b/tests/python/bl_keymap_completeness.py
similarity index 100%
rename from source/tests/bl_keymap_completeness.py
rename to tests/python/bl_keymap_completeness.py
diff --git a/source/tests/bl_load_addons.py b/tests/python/bl_load_addons.py
similarity index 100%
rename from source/tests/bl_load_addons.py
rename to tests/python/bl_load_addons.py
diff --git a/source/tests/bl_load_py_modules.py b/tests/python/bl_load_py_modules.py
similarity index 100%
rename from source/tests/bl_load_py_modules.py
rename to tests/python/bl_load_py_modules.py
diff --git a/source/tests/bl_mesh_modifiers.py b/tests/python/bl_mesh_modifiers.py
similarity index 99%
rename from source/tests/bl_mesh_modifiers.py
rename to tests/python/bl_mesh_modifiers.py
index 2f342f2..b3f77ae 100644
--- a/source/tests/bl_mesh_modifiers.py
+++ b/tests/python/bl_mesh_modifiers.py
@@ -25,7 +25,7 @@
 # Later, we may have a way to check the results are valid.
 
 
-# ./blender.bin --factory-startup --python source/tests/bl_mesh_modifiers.py
+# ./blender.bin --factory-startup --python tests/python/bl_mesh_modifiers.py
 #
 
 import math
diff --git a/source/tests/bl_mesh_validate.py b/tests/python/bl_mesh_validate.py
similarity index 100%
rename from source/tests/bl_mesh_validate.py
rename to tests/python/bl_mesh_validate.py
diff --git a/source/tests/bl_pyapi_mathutils.py b/tests/python/bl_pyapi_mathutils.py
similarity index 99%
rename from source/tests/bl_pyapi_mathutils.py
rename to tests/python/bl_pyapi_mathutils.py
index c312444..20312ef 100644
--- a/source/tests/bl_pyapi_mathutils.py
+++ b/tests/python/bl_pyapi_mathutils.py
@@ -1,4 +1,4 @@
-# ./blender.bin --background -noaudio --python source/tests/bl_pyapi_mathutils.py
+# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_mathutils.py
 import unittest
 from test import support
 from mathutils import Matrix, Vector
diff --git a/source/tests/bl_pyapi_units.py b/tests/python/bl_pyapi_units.py
similarity index 98%
rename from source/tests/bl_pyapi_units.py
rename to tests/python/bl_pyapi_units.py
index 76b97ef..a518b4e 100644
--- a/source/tests/bl_pyapi_units.py
+++ b/tests/python/bl_pyapi_units.py
@@ -1,4 +1,4 @@
-# ./blender.bin --background -noaudio --python source/tests/bl_pyapi_units.py
+# ./blender.bin --background -noaudio --python tests/python/bl_pyapi_units.py
 import unittest
 from test import support
 
diff --git a/source/tests/bl_rna_wiki_reference.py b/tests/python/bl_rna_wiki_reference.py
similarity index 98%
rename from source/tests/bl_rna_wiki_reference.py
rename to tests/python/bl_rna_wiki_reference.py
index 8cb20aa..5781c53 100644
--- a/source/tests/bl_rna_wiki_reference.py
+++ b/tests/python/bl_rna_wiki_reference.py
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 
 # Use for validating our wiki interlinking.
-#  ./blender.bin --background -noaudio --python source/tests/bl_rna_wiki_reference.py
+#  ./blender.bin --background -noaudio --python tests/python/bl_rna_wiki_reference.py
 #
 # 1) test_data()              -- ensure the data we have is correct format
 # 2) test_lookup_coverage()   -- ensure that we have lookups for _every_ RNA path
diff --git a/source/tests/bl_rst_completeness.py b/tests/python/bl_rst_completeness.py
similarity index 97%
rename from source/tests/bl_rst_completeness.py
rename to tests/python/bl_rst_completeness.py
index 6e67f8d..d0ba2c5 100644
--- a/source/tests/bl_rst_completeness.py
+++ b/tests/python/bl_rst_completeness.py
@@ -20,11 +20,11 @@
 
 # run this script in the game engine.
 # or on the command line with...
-#  ./blender.bin --background -noaudio --python source/tests/bl_rst_completeness.py
+#  ./blender.bin --background -noaudio --python tests/python/bl_rst_completeness.py
 
 # Paste this into the bge and run on an always actuator.
 '''
-filepath = "/dsk/data/src/blender/blender/source/tests/bl_rst_completeness.py"
+filepath = "/src/blender/tests/python/bl_rst_completeness.py"
 exec(compile(open(filepath).read(), filepath, 'exec'))
 '''
 
diff --git a/source/tests/bl_run_operators.py b/tests/python/bl_run_operators.py
similarity index 100%
rename from source/tests/bl_run_operators.py
rename to tests/python/bl_run_operators.py
diff --git a/source/tests/bl_test.py b/tests/python/bl_test.py
similarity index 100%
rename from source/tests/bl_test.py
rename to tests/python/bl_test.py
diff --git a/source/tests/pep8.py b/tests/python/pep8.py
similarity index 98%
rename from source/tests/pep8.py
rename to tests/python/pep8.py
index cca49d5..7713ffe 100644
--- a/source/tests/pep8.py
+++ b/tests/python/pep8.py
@@ -32,7 +32,7 @@ import os
 # in Debian install pylint pep8 with apt-get/aptitude/etc
 #
 # on *nix run
-#   python source/tests/pep8.py > test_pep8.log 2>&1
+#   python tests/pep8.py > test_pep8.log 2>&1
 
 # how many lines to read into the file, pep8 comment
 # should be directly after the license header, ~20 in most cases
diff --git a/source/tests/rna_array.py b/tests/python/rna_array.py
similarity index 100%
rename from source/tests/rna_array.py
rename to tests/python/rna_array.py
diff --git a/source/tests/rna_info_dump.py b/tests/python/rna_info_dump.py
similarity index 98%
rename from source/tests/rna_info_dump.py
rename to tests/python/rna_info_dump.py
index 40d7b7c..c26d94a 100644
--- a/source/tests/rna_info_dump.py
+++ b/tests/python/rna_info_dump.py
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 
 # Used for generating API diffs between releases
-#  ./blender.bin --background -noaudio --python source/tests/rna_info_dump.py
+#  ./blender.bin --background -noaudio --python tests/python/rna_info_dump.py
 
 import bpy
 
diff --git a/source/tests/rst_to_doctree_mini.py b/tests/python/rst_to_doctree_mini.py
similarity index 100%
rename from source/tests/rst_to_doctree_mini.py
rename to tests/python/rst_to_doctree_mini.py




More information about the Bf-blender-cvs mailing list