Move tests into tests/ top-level dir

This commit is contained in:
Campbell Barton 2014-06-18 21:44:40 +10:00
parent 7259ac821e
commit 0eb060c7b4
Notes: blender-bot 2023-02-14 10:28:21 +01:00
Referenced by issue #40690, user addons
22 changed files with 25 additions and 16 deletions

View 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)

View 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

View File

@ -29,4 +29,3 @@ if(WITH_GAMEENGINE)
add_subdirectory(gameengine)
endif()
add_subdirectory(tests)

4
tests/CMakeLists.txt Normal file
View File

@ -0,0 +1,4 @@
# Python CTests
add_subdirectory(python)

View 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]

View File

@ -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" \

View 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

View 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

View 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

View 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

View File

@ -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'))
'''

View 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

View 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