diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 2117655..f2adbe9 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -6,20 +6,29 @@ else OPENSCAD=/Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD fi +if [ "$*" != "" ] ; then + INFILES="$*" +else + INFILES="tests/test_*.scad" +fi + OUTCODE=0 -for testscript in tests/test_*.scad ; do - 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 - OUTCODE=-1 +for testscript in $INFILES ; do + repname="$(basename $testscript | sed 's/^test_//')" + 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) + if [ "$res" = "" ] ; then + echo "$repname: PASS" + else + echo "$repname: FAIL!" + cat out.echo + echo + OUTCODE=-1 + fi + rm -f out.echo fi - rm -f out.echo done exit $OUTCODE diff --git a/version.scad b/version.scad index 43bd2c8..0101d14 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,371]; +BOSL_VERSION = [2,0,372]; // Section: BOSL Library Version Functions