Update of /cvsroot/pure-data/externals/zexy/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26836
Modified Files: runtests.sh runtests.txt Log Message: better evaluation of passed/failed tests (some tests MUST fail in order to work correctly: these are prefixed with "fail_")
Index: runtests.txt =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/tests/runtests.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** runtests.txt 6 Sep 2007 13:30:04 -0000 1.10 --- runtests.txt 6 Sep 2007 14:03:24 -0000 1.11 *************** *** 76,83 **** repeat/noargs; s2l/numsymbols; testtests/fail; testtests/fail_wait0; testtests/fail_wait10; - testtests/noresult; testtests/pass; testtests/pass_wait0; --- 76,83 ---- repeat/noargs; s2l/numsymbols; + testtests/fail_noresult; testtests/fail; testtests/fail_wait0; testtests/fail_wait10; testtests/pass; testtests/pass_wait0;
Index: runtests.sh =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/tests/runtests.sh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** runtests.sh 14 Mar 2007 09:53:37 -0000 1.6 --- runtests.sh 6 Sep 2007 14:03:24 -0000 1.7 *************** *** 26,30 **** function debug() { : ! # echo $@ }
--- 26,30 ---- function debug() { : ! if [ "x${DEBUG}" = "xyes" ]; then echo $@; fi }
*************** *** 41,46 ****
numtests=$(grep -c . ${testfile}) debug "number of tests = ${numtests}" ! echo "regression-test: ${numtests} tests total" >> ${logfile} debug "show results" cat ${logfile} | egrep "^regression-test: " | sed -e 's/^regression-test: //' --- 41,59 ----
numtests=$(grep -c . ${testfile}) + numpass=$(egrep -c "regression-test: (.*/fail.*: failed|.*: OK)$" ${logfile}) + let numfail=0 + failtests="" + for t in $(egrep "regression-test: .*: (failed|OK)$" ${logfile} | egrep -v "regression-test: (.*/fail.*: failed|.*: OK)$" | awk '{print $2}') + do + failtests="${failtests} ${t%:}" + let numfail=numfail+1 + done debug "number of tests = ${numtests}" ! echo "regression-test: ======================================" >> ${logfile} ! echo "regression-test: ${numtests} regression-tests total" >> ${logfile} ! echo "regression-test: ${numpass} regression-tests passed" >> ${logfile} ! echo "regression-test: ${numfail} regression-tests failed" >> ${logfile} ! echo "regression-test: ======================================" >> ${logfile} ! echo "regression-test: failed tests: ${failtests}" >> ${logfile} debug "show results" cat ${logfile} | egrep "^regression-test: " | sed -e 's/^regression-test: //' *************** *** 58,68 **** function run_withgui() { debug "running test with gui" ! ${PD} ${LIBFLAGS} -stderr runtests.pd > ${RUNTESTS_LOG} 2>&1 ! debug "testing completed, no evaluation will be done; see ${RUNTESTS_LOG} for results" }
list_tests > ${RUNTESTS_TXT}
! if test "x$1" = "x-gui"; then run_withgui else --- 71,98 ---- function run_withgui() { debug "running test with gui" ! ${PD} ${LIBFLAGS} -stderr runtests.pd 2>&1 | tee ${RUNTESTS_LOG} ! echo "testing completed, no evaluation will be done; see ${RUNTESTS_LOG} for results" }
list_tests > ${RUNTESTS_TXT}
! USEGUI="" ! DEBUG="" ! ! while [ "$@" ] ! do ! if test "x$1" = "x-gui"; then ! USEGUI="yes" ! fi ! if test "x$1" = "x-debug"; then ! DEBUG="yes" ! fi ! if test "x$1" = "x-d"; then ! DEBUG="yes" ! fi ! shift ! done ! ! if [ "x${USEGUI}" = "xyes" ]; then run_withgui else *************** *** 70,72 **** fi
! --- 100,102 ---- fi
! echo $@