BOSL2/scripts/run_tests.sh

23 lines
519 B
Bash
Raw Normal View History

#!/bin/bash
2020-06-20 06:18:04 +00:00
if [ "$(uname -s)" != "Darwin" ]; then
OPENSCAD=openscad
else
OPENSCAD=/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD
fi
for testscript in tests/test_*.scad ; do
2019-10-24 05:49:40 +00:00
repname="$(basename $testscript|sed 's/^test_//')"
${OPENSCAD} -o out.echo --hardwarnings --check-parameters true --check-parameter-ranges true $testscript 2>&1
res=$(cat out.echo)
if [ "$res" = "" ] ; then
echo "$repname: PASS"
else
echo "$repname: FAIL!"
cat out.echo
echo
fi
rm -f out.echo
done