mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 21:58:27 +01:00
Allow running single test scripts.
This commit is contained in:
parent
62b54e4ef3
commit
7f5257fefb
@ -6,10 +6,18 @@ else
|
|||||||
OPENSCAD=/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD
|
OPENSCAD=/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$*" != "" ] ; then
|
||||||
|
INFILES="$*"
|
||||||
|
else
|
||||||
|
INFILES="tests/test_*.scad"
|
||||||
|
fi
|
||||||
|
|
||||||
OUTCODE=0
|
OUTCODE=0
|
||||||
for testscript in tests/test_*.scad ; do
|
for testscript in $INFILES ; do
|
||||||
repname="$(basename $testscript|sed 's/^test_//')"
|
repname="$(basename $testscript | sed 's/^test_//')"
|
||||||
${OPENSCAD} -o out.echo --hardwarnings --check-parameters true --check-parameter-ranges true $testscript 2>&1
|
testfile="tests/test_$repname"
|
||||||
|
if [ -f "$testfile" ] ; then
|
||||||
|
${OPENSCAD} -o out.echo --hardwarnings --check-parameters true --check-parameter-ranges true $testfile 2>&1
|
||||||
res=$(cat out.echo)
|
res=$(cat out.echo)
|
||||||
if [ "$res" = "" ] ; then
|
if [ "$res" = "" ] ; then
|
||||||
echo "$repname: PASS"
|
echo "$repname: PASS"
|
||||||
@ -20,6 +28,7 @@ for testscript in tests/test_*.scad ; do
|
|||||||
OUTCODE=-1
|
OUTCODE=-1
|
||||||
fi
|
fi
|
||||||
rm -f out.echo
|
rm -f out.echo
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
exit $OUTCODE
|
exit $OUTCODE
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,371];
|
BOSL_VERSION = [2,0,372];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user