2 # Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 echo "Usage: `basename %0` <gnash_builddir> <gnash_srcdir> <swfdec_tracedir> [<startingcharacters>]" >&2
29 STARTPATTERN
="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
34 if [ -x /bin
/md5
]; then
42 GPROCESSOR
="${BUILDDIR}/utilities/gprocessor"
43 GNASHRC
="${BUILDDIR}/testsuite/gnashrc"
44 GNASH_PLAYER
="${BUILDDIR}/gui/gnash"
45 SWFDEC_GNASH_TESTER
="${SRCDIR}/swfdec_gnash_tester"
50 # TODO: fix predictability
51 # see http://wiki.gnashdev.org/PredictableLoading
53 # Generated by gen_run_swfdec_testsuite.sh on
56 # The trace output of the Date object in the testsuite has timezone as GMT.
58 export GNASHRC=${GNASHRC}
59 export GPROCESSOR=${GPROCESSOR}
60 EXPECTPASS=${SRCDIR}/PASSING
61 REALTIME=${SRCDIR}/REALTIME
63 for test in \`ls ${SWFDECTRACEDIR}/[$STARTPATTERN]*.swf\`; do
64 testname=\`basename \${test}\`
65 md5=\`$MD5 \${test} | cut -d' ' -f$CUT\`
66 testid="\${testname}:\${md5}"
68 if [ -f \${test}.act ]; then
69 echo "NOTE: skipping \${testname} (unsupported user interaction)"
70 echo "UNTESTED: \${testid} (requires unsupported user interaction)"
77 if grep -q "^\${testid}\$" \${EXPECTPASS}; then
81 if grep -q "^\${testname}:" \${EXPECTPASS}; then
83 expectpasslabel="not anymore"
89 if grep -q "^\${testname}\$" \${REALTIME}; then
91 echo "NOTE: running \${testname} (realtime - expect pass: \${expectpasslabel})"
93 echo "NOTE: running \${testname} (expect pass: \${expectpasslabel})"
96 ${SWFDEC_GNASH_TESTER} \${test} \${flags} > \${testname}.log
98 #echo "NOTE: ${SWFDEC_GNASH_TESTER} \${test} returned \$ret"
99 if [ \$ret -eq 0 ]; then
100 if [ "\${expectpass}" = "yes" ]; then
101 echo "PASSED: \${testid}"
103 echo "XPASSED: \${testid}"
105 elif [ \$ret -eq 1 ]; then
106 if [ "\${expectpass}" = "yes" ]; then
107 echo "FAILED: \${testid} (traces in \${testname}.trace-gnash, log in \${testname}.log)"
109 if [ "\${usedtopass}" = "yes" ]; then
110 echo "XFAILED: \${testid} (USED TO PASS! traces in \${testname}.trace-gnash, log in \${testname}.log)"
112 echo "XFAILED: \${testid} (traces in \${testname}.trace-gnash, log in \${testname}.log)"
116 echo "FAILED: \${testid} crashed gnash (stdout in \${testname}.out, stderr in \${testname}.err)"