4 # Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 while getopts c
:C
: name
; do
22 c
) endtagpat
="$OPTARG" ;;
23 C
) endtagpat
="$OPTARG"; endtagexp
=X
;;
26 echo "Usage: $0 [-r <runs>] [-f <advances>] [-c <string>] <swf> ..."
27 echo " -c <pattern> : verify that the test ends with a trace "
28 echo " matching <pattern>, or print a failure"
29 echo " -C <pattern> : same as -c <pattern> but a failure is "
35 shift $
(($OPTIND - 1))
49 env |
grep GNASH |
while read REPLY
; do
50 echo "export ${REPLY}"
56 outlog1=${top_builddir}/testoutlog.\$$
57 outlog2=${top_builddir}/testoutlog2.\$$
59 echo "Running first process"
60 ${top_builddir}/gui/gnash -vvv -r0 ${t1} -t ${timeout} | tee \${outlog1} &
61 echo "Running second process"
62 ${top_builddir}/gui/gnash -vvv -r0 ${t2} -t ${timeout} | tee \${outlog2} &
65 for log in \${outlog1} \${outlog2}; do
66 if test "x${endtagpat}" != x; then
67 lasttrace=\`grep TRACE \$log | tail -1 | sed 's/.*TRACE: //'\`
68 if ! expr "\${lasttrace}" : '${endtagpat}' > /dev/null; then
69 echo "${endtagexp}FAILED: consistency check: last trace from run of test \${t} (\${lasttrace}) doesn't match pattern (${endtagpat})"
71 echo "${endtagexp}PASSED: consistency check: last trace from run of test \${t} (\${lasttrace}) matches pattern (${endtagpat})"