From 879c3cbaf6d37b1fb7b9d694070e769ad2777388 Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Tue, 15 Apr 2025 16:28:29 -0700 Subject: [PATCH] Added script to run tests from the host machine --- test.sh | 2 ++ tests/test.sh | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 test.sh diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..28854f3 --- /dev/null +++ b/test.sh @@ -0,0 +1,2 @@ +# usr/bin/env bash +docker run -it --volume ${PWD}:/io_scene_psk_psa --volume ${PWD}/io_scene_psk_psa:/addons/io_scene_psk_psa --volume ${PWD}/tests:/tests $(docker build -q .) diff --git a/tests/test.sh b/tests/test.sh index 741ebda..9014d9f 100644 --- a/tests/test.sh +++ b/tests/test.sh @@ -1,4 +1,6 @@ -# This file is meant to be executed inside a Docker container. +# usr/bin/env bash +# This file is meant to be executed from inside a Docker container. +# To run tests on the host system, use the `test.sh` script in the root directory. export BLENDER_EXECUTABLE=$(cat /blender_executable_path) pytest --cov-report xml --cov=/root/.config/blender -svv tests --blender-executable $BLENDER_EXECUTABLE --blender-addons-dirs ../addons # Fixes the paths in the coverage report to be relative to the current directory.