Move tests into tests/ top-level dir
authorCampbell Barton <ideasman42@gmail.com>
Wed, 18 Jun 2014 11:44:40 +0000 (21:44 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 18 Jun 2014 12:03:46 +0000 (22:03 +1000)
22 files changed:
CMakeLists.txt
GNUmakefile
source/CMakeLists.txt
tests/CMakeLists.txt [new file with mode: 0644]
tests/check_deprecated.py [moved from source/tests/check_deprecated.py with 97% similarity]
tests/python/CMakeLists.txt [moved from source/tests/CMakeLists.txt with 100% similarity]
tests/python/batch_import.py [moved from source/tests/batch_import.py with 96% similarity]
tests/python/bl_keymap_completeness.py [moved from source/tests/bl_keymap_completeness.py with 100% similarity]
tests/python/bl_load_addons.py [moved from source/tests/bl_load_addons.py with 100% similarity]
tests/python/bl_load_py_modules.py [moved from source/tests/bl_load_py_modules.py with 100% similarity]
tests/python/bl_mesh_modifiers.py [moved from source/tests/bl_mesh_modifiers.py with 99% similarity]
tests/python/bl_mesh_validate.py [moved from source/tests/bl_mesh_validate.py with 100% similarity]
tests/python/bl_pyapi_mathutils.py [moved from source/tests/bl_pyapi_mathutils.py with 99% similarity]
tests/python/bl_pyapi_units.py [moved from source/tests/bl_pyapi_units.py with 98% similarity]
tests/python/bl_rna_wiki_reference.py [moved from source/tests/bl_rna_wiki_reference.py with 98% similarity]
tests/python/bl_rst_completeness.py [moved from source/tests/bl_rst_completeness.py with 97% similarity]
tests/python/bl_run_operators.py [moved from source/tests/bl_run_operators.py with 100% similarity]
tests/python/bl_test.py [moved from source/tests/bl_test.py with 100% similarity]
tests/python/pep8.py [moved from source/tests/pep8.py with 98% similarity]
tests/python/rna_array.py [moved from source/tests/rna_array.py with 100% similarity]
tests/python/rna_info_dump.py [moved from source/tests/rna_info_dump.py with 98% similarity]
tests/python/rst_to_doctree_mini.py [moved from source/tests/rst_to_doctree_mini.py with 100% similarity]

index a46c0a1cc2f1c016f54b93edddcbfc80c2f47dd2..559382080f3114d6977c1e11b6be076bae688ecf 100644 (file)
@@ -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)
index 4f76cb3565db3ffb7cacb984d5df9d9c1a2ab800..c7807720cb9263bd21122cfd14cba51f63d944f8 100644 (file)
@@ -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
index 391fdf42d28a68e42a593f7f130149c6c66f6502..c696719e6501aba03345e89a078b056727b929ec 100644 (file)
@@ -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 (file)
index 0000000..78262f5
--- /dev/null
@@ -0,0 +1,4 @@
+
+# Python CTests
+add_subdirectory(python)
+
similarity index 97%
rename from source/tests/check_deprecated.py
rename to tests/check_deprecated.py
index bb9fcd818d2ffdb01afe140e9c2710a124af02f3..d7193155b1cc4ce983417ddea2598d1899933275 100644 (file)
@@ -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]
 
similarity index 96%
rename from source/tests/batch_import.py
rename to tests/python/batch_import.py
index a2c5fb5905566c22e6fbd8bdb2483574dc85827c..dea08b45c3a62662bd90bfeed222bca91547b7a8 100644 (file)
 """
 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" \
similarity index 99%
rename from source/tests/bl_mesh_modifiers.py
rename to tests/python/bl_mesh_modifiers.py
index 2f342f2c65e136e3817b4c2a2d603cbd61bddc83..b3f77aed96b6be3ccf6231aed9f38689f970e530 100644 (file)
@@ -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
similarity index 99%
rename from source/tests/bl_pyapi_mathutils.py
rename to tests/python/bl_pyapi_mathutils.py
index c31244462cdc0f8492ab676c9019bcae91926763..20312efcc020f3479e171f701a86448fd5e94961 100644 (file)
@@ -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
similarity index 98%
rename from source/tests/bl_pyapi_units.py
rename to tests/python/bl_pyapi_units.py
index 76b97ef00a1a43366e93222eee93fbf3adea332f..a518b4e0caf65cc81e2e23c4ac0e545a0badb437 100644 (file)
@@ -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
 
similarity index 98%
rename from source/tests/bl_rna_wiki_reference.py
rename to tests/python/bl_rna_wiki_reference.py
index 8cb20aaf7f67512e5b668b2c1a976c6a9cc948ab..5781c53c045c6e64c3d3863fccf89fd63d9eb813 100644 (file)
@@ -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
similarity index 97%
rename from source/tests/bl_rst_completeness.py
rename to tests/python/bl_rst_completeness.py
index 6e67f8d908d88b077b2f920c4ac6590016fcdc96..d0ba2c552cfde8b893b6debac268cf53db26ac7d 100644 (file)
 
 # 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'))
 '''
 
similarity index 98%
rename from source/tests/pep8.py
rename to tests/python/pep8.py
index cca49d54ac0a2a86a048d4abfb4e6df23861b62d..7713ffeaaa4041027b46585a5f18f360392c9d70 100644 (file)
@@ -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
similarity index 98%
rename from source/tests/rna_info_dump.py
rename to tests/python/rna_info_dump.py
index 40d7b7c38a6169a4b7204dd9ecfba44e903c8b72..c26d94a1246c0ce10d1e2f92724eefdb39f8231a 100644 (file)
@@ -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