CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/10/05 11:11:44
Modified files: . : ChangeLog testsuite : generic-testrunner.sh testsuite/misc-swfmill.all: Makefile.am Log message: * testsuite/generic-testrunner.sh: add support for consistency checking (-c and -C switches) * testsuite/misc-swfmill.all/Makefile.am: expect jump_after_end.swf to end with a PASSED trace (for now this will catch errors in jump after end bugs). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4536&r2=1.4537 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/generic-testrunner.sh?cvsroot=gnash&r1=1.10&r2=1.11 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfmill.all/Makefile.am?cvsroot=gnash&r1=1.5&r2=1.6 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4536 retrieving revision 1.4537 diff -u -b -r1.4536 -r1.4537 --- ChangeLog 5 Oct 2007 10:32:31 -0000 1.4536 +++ ChangeLog 5 Oct 2007 11:11:44 -0000 1.4537 @@ -1,5 +1,13 @@ 2007-10-05 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/generic-testrunner.sh: add support for consistency + checking (-c and -C switches) + * testsuite/misc-swfmill.all/Makefile.am: expect jump_after_end.swf + to end with a PASSED trace (for now this will catch errors in + jump after end bugs). + +2007-10-05 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/misc-swfmill.all/jump_after_end.xml: Made the self-contained (almost completely). The problem now is that if it fails it will NOT print nor FAILED nor PASSED so Index: testsuite/generic-testrunner.sh =================================================================== RCS file: /sources/gnash/gnash/testsuite/generic-testrunner.sh,v retrieving revision 1.10 retrieving revision 1.11 diff -u -b -r1.10 -r1.11 --- testsuite/generic-testrunner.sh 4 Aug 2007 16:43:29 -0000 1.10 +++ testsuite/generic-testrunner.sh 5 Oct 2007 11:11:44 -0000 1.11 @@ -19,12 +19,23 @@ runs=1 advances=0 +endtagpat= +endtagexp="" -while getopts r:f: name; do +while getopts r:f:c:C: name; do case $name in r) runs="$OPTARG" ;; f) advances="$OPTARG" ;; - ?) echo "Usage: $0 [-r <runs>] [-f <advances>] <swf> ..." >&2; + c) endtagpat="$OPTARG" ;; + C) endtagpat="$OPTARG"; endtagexp=X ;; + ?) + { + echo "Usage: $0 [-r <runs>] [-f <advances>] [-c <string>] <swf> ..." + echo " -r <runs> : allow for <runs> jump-backs" + echo " -f <advances> : only advance <advances> times" + echo " -c <pattern> : verify that the test ends with a trace matching <pattern>, or print a failure" + echo " -C <pattern> : same as -c <pattern> but a failure is expected" + } >&2 exit 1;; esac done @@ -45,7 +56,21 @@ cat << EOF for t in ${testfiles}; do + outlog=\${t}.output.\$$ echo "NOTE: Running test \${t}" + ( + exec > \${outlog} ${top_builddir}/utilities/gprocessor -r${runs} -f${advances} -v \${t} || echo "FAILED: gprocessor returned an error while playing '\${t}'" + ) + cat \${outlog} + if test "x${endtagpat}" != x; then + lasttrace=\`grep TRACE \${outlog} | tail -1 | sed 's/.*TRACE: //'\` + if ! expr "\${lasttrace}" : '${endtagpat}' > /dev/null; then + echo "${endtagexp}FAILED: consistency check: last trace (\${lasttrace}) doesn't match pattern (${endtagpat})" + else + echo "${endtagexp}PASSED: consistency check: last trace (\${lasttrace}) matches pattern (${endtagpat})" + fi + fi + rm \${outlog} done EOF Index: testsuite/misc-swfmill.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-swfmill.all/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- testsuite/misc-swfmill.all/Makefile.am 5 Oct 2007 08:24:59 -0000 1.5 +++ testsuite/misc-swfmill.all/Makefile.am 5 Oct 2007 11:11:44 -0000 1.6 @@ -40,11 +40,11 @@ cp ../misc-ming.all/Dejagnu.swf . check_SCRIPTS = \ - alltests-runner \ + jump_after_end-runner \ $(NULL) -alltests-runner: $(srcdir)/../generic-testrunner.sh $(SC_XMLTESTS_OUT) - sh $< -r 50 $(top_builddir) $(SC_XMLTESTS_OUT) > $@ +jump_after_end-runner: $(srcdir)/../generic-testrunner.sh jump_after_end.swf + sh $< -r 50 -c PASSED $(top_builddir) jump_after_end.swf > $@ chmod 755 $@ .xml.swf: _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit