Add all mecanism about the blender unit test

This commit is contained in:
Aurelien Vaillant
2022-01-24 16:56:40 +01:00
parent 5b16883077
commit 435d013d58
7 changed files with 144 additions and 3 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/bin/sh
# To disable the sdt with each command, add ' > /dev/null 2>&1' to redirect all info
# Set all variables
MOUNT_FOLDER="/addon-moderlab"
INSTALL_ADDON="$MOUNT_FOLDER/tests/utils/blender_addon.py"
export FOLDER_TEST=$MOUNT_FOLDER
# ----- ----- ----- -----
# From a previous archive generated, install the moderlab plugin
/opt/blender/blender --background --python "$INSTALL_ADDON" -- "$MOUNT_FOLDER" > /dev/null 2>&1
install_error=$?
if [ $install_error = 1 ]; then
echo Blender Test Error
echo Exit code is install_error
(exit 1)
else
# ----- ----- ----- -----
# Launch Blender Test
/opt/blender/blender --background -noaudio --disable-autoexec --addons moderlab_type --python-exit-code 1 --python "$1" -- --verbose
blender_error=$?
if [ $blender_error = 1 ]; then
echo Blender Test Error
echo Exit code is $blender_error
(exit 1)
fi
fi