Commit 9a9751dc authored by Adam Štěpánek's avatar Adam Štěpánek
Browse files

Add better error reporting to tests

parent 7b64a4ef
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
LIBHASH=true
INDENT=0
LAYOUT_DEPTH=0
FAILED_SCRIPTS=()

hashsquash() {
    if [ ${#HASH} -ne 64 ]; then
@@ -125,6 +126,7 @@ runpde() {
    processing-java --sketch=/sketches/$1 --run "$PDEHASH" "$WIDTH" "$HEIGHT" "/tmp" >/dev/null 2>&1
    if [ $? -ne 0 ]; then
        perror Processing failed.
        FAILED_SCRIPTS+=("$1")
    fi
    OUT="/tmp/$1_$PDEHASH.png"
}
@@ -146,6 +148,7 @@ runblend() {
    blender $BLEND --background --python $SCRIPT >/dev/null 2>&1
    if [ $? -ne 0 ]; then
        perror Blender failed.
        FAILED_SCRIPTS+=("$1")
    fi
}

+4 −0
Original line number Diff line number Diff line
@@ -49,3 +49,7 @@ for L in /scripts/layouts/*.sh; do
        pdebug "Saved to '$TESTOUT'"
    indentpop
done

for F in ${FAILED_SCRIPTS[*]}; do
    perror $F
done
+1 −1
Original line number Diff line number Diff line
$container = (docker create -it --network none -e DEBUG=true -e WIDTH=3840 -e HEIGHT=2160 hash /scripts/testout.sh)
$container = (docker create -it --network none -e DEBUG=true -e WIDTH=1920 -e HEIGHT=1080 hash /scripts/testout.sh)
docker start -ai $container
if (Test-Path testout) {
    Remove-Item -r testout