Fix: Update tests data path to new directory

This commit is contained in:
Brecht Van Lommel
2024-02-22 14:17:52 +01:00
parent b5c8505f5a
commit 8dfb87d1af
16 changed files with 20 additions and 21 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ namespace blender::tests {
/* These strings are passed on the CLI with the --test-asset-dir and --test-release-dir arguments.
* The arguments are added automatically when invoking tests via `ctest`. */
const std::string &flags_test_asset_dir(); /* ../lib/tests in the SVN directory. */
const std::string &flags_test_asset_dir(); /* tests/data in the Blender repository. */
const std::string &flags_test_release_dir(); /* bin/{blender version} in the build directory. */
} // namespace blender::tests
+2 -3
View File
@@ -6,7 +6,7 @@
#include "MEM_guardedalloc.h"
DEFINE_string(test_assets_dir, "", "lib/tests directory from SVN containing the test assets.");
DEFINE_string(test_assets_dir, "", "tests/data directory containing the test assets.");
DEFINE_string(test_release_dir, "", "bin/{blender version} directory of the current build.");
namespace blender::tests {
@@ -14,8 +14,7 @@ namespace blender::tests {
const std::string &flags_test_asset_dir()
{
if (FLAGS_test_assets_dir.empty()) {
ADD_FAILURE()
<< "Pass the flag --test-assets-dir and point to the lib/tests directory from SVN.";
ADD_FAILURE() << "Pass the flag --test-assets-dir and point to the tests/data directory.";
}
return FLAGS_test_assets_dir;
}
+1 -1
View File
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_alembic_io_test.py -- --testdir /path/to/lib/tests/alembic
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_alembic_io_test.py -- --testdir /path/to/tests/data/alembic
"""
import math
+1 -1
View File
@@ -9,7 +9,7 @@ import sys
from rna_prop_ui import rna_idprop_quote_path
"""
blender -b -noaudio --factory-startup --python tests/python/bl_animation_drivers.py -- --testdir /path/to/lib/tests/animation
blender -b -noaudio --factory-startup --python tests/python/bl_animation_drivers.py -- --testdir /path/to/tests/data/animation
"""
+1 -1
View File
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
blender -b -noaudio --factory-startup --python tests/python/bl_animation_fcurves.py -- --testdir /path/to/lib/tests/animation
blender -b -noaudio --factory-startup --python tests/python/bl_animation_fcurves.py -- --testdir /path/to/tests/data/animation
"""
import pathlib
+1 -1
View File
@@ -9,7 +9,7 @@ import sys
from math import radians
"""
blender -b -noaudio --factory-startup --python tests/python/bl_animation_keyframing.py -- --testdir /path/to/lib/tests/animation
blender -b -noaudio --factory-startup --python tests/python/bl_animation_keyframing.py -- --testdir /path/to/tests/data/animation
"""
+1 -1
View File
@@ -75,7 +75,7 @@ def argparse_create():
# When --help or no args are given, print this help
description = ("Test basic versioning code by opening all blend files "
"in `lib/tests` directory.")
"in `tests/data` directory.")
parser = argparse.ArgumentParser(description=description)
parser.add_argument(
"--src-test-dir",
+1 -1
View File
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_constraints.py -- --testdir /path/to/lib/tests/constraints
./blender.bin --background -noaudio --factory-startup --python tests/python/bl_constraints.py -- --testdir /path/to/tests/data/constraints
"""
import pathlib
+1 -1
View File
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
"""
blender -b -noaudio --factory-startup --python tests/python/bl_rigging_symmetrize.py -- --testdir /path/to/lib/tests/animation
blender -b -noaudio --factory-startup --python tests/python/bl_rigging_symmetrize.py -- --testdir /path/to/tests/data/animation
"""
import pathlib
@@ -5,7 +5,7 @@
"""
Call as follows:
python collada_mesh_simple.py --blender PATH_TO_BLENDER_EXE --testdir PATH_TO_SVN/lib/tests/collada/mesh
python collada_mesh_simple.py --blender PATH_TO_BLENDER_EXE --testdir tests/data/collada/mesh
"""
import sys
@@ -5,7 +5,7 @@
"""
Call as follows:
python collada_mesh_simple.py --blender PATH_TO_BLENDER_EXE --testdir PATH_TO_SVN/lib/tests/collada/mesh
python collada_mesh_simple.py --blender PATH_TO_BLENDER_EXE --testdir tests/data/collada/mesh
"""
import sys
+1 -1
View File
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# To run all tests, use
# BLENDER_VERBOSE=1 ./bin/blender ../lib/tests/modeling/curve_to_mesh.blend --python ../blender/tests/python/bl_curve_to_mesh.py -- --run-all-tests
# BLENDER_VERBOSE=1 ./bin/blender ../tests/data/modeling/curve_to_mesh.blend --python ../blender/tests/python/bl_curve_to_mesh.py -- --run-all-tests
# (that assumes the test is run from a build directory in the same directory as the source code)
import bpy
import os