gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2290-g36028f4
Date: Sat, 28 Jan 2017 07:09:43 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  36028f40cc8fee39d411e13284f2d7334e84b9cc (commit)
      from  f9db2f227e72b177854f497b72c0f9ab45b6869a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=36028f40cc8fee39d411e13284f2d7334e84b9cc


commit 36028f40cc8fee39d411e13284f2d7334e84b9cc
Author: Nutchanon Wetchasit <address@hidden>
Date:   Sat Jan 28 08:07:01 2017 +0100

    Add automated slash-colon path tests for GetVariable() plugin function.
    
    See bug #42395 <https://savannah.gnu.org/bugs/?42395>

diff --git a/testsuite/misc-swfc.all/Makefile.am 
b/testsuite/misc-swfc.all/Makefile.am
index df8e76d..f0a6013 100644
--- a/testsuite/misc-swfc.all/Makefile.am
+++ b/testsuite/misc-swfc.all/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this fill with automake to generate Makefile.in
 # 
-#   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
+#   Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2014, 2017
 #   Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -49,10 +49,12 @@ endif
 BOGO_SCTESTS = \
        $(NULL)
 
-# These ones are the ones for which a MovieTester-based runner exists
+# These ones are the ones tested via dedicated MovieTester-based
+# or shell-based test runners
 INTERACTIVE_SCTESTS = \
        button_test1.sc \
        button_test2.sc  \
+       submoviegetvar.sc \
        $(NULL)
 
 if BUILD_LIBSOUND
@@ -110,6 +112,7 @@ TEST_DRIVERS = ../simple.exp
 TEST_CASES = \
        sanetests-runner \
        bogustests-runner \
+       submoviegetvartest-runner \
        $(check_PROGRAMS)
 
 sanetests-runner: $(srcdir)/../generic-testrunner.sh $(SANE_SCTESTS_OUT) 
$(AUXMOVIES_OUT) Makefile
@@ -120,7 +123,11 @@ bogustests-runner: $(srcdir)/../generic-testrunner.sh 
$(BOGO_SCTESTS_OUT) $(AUXM
        sh $(srcdir)/../generic-testrunner.sh -C __END_OF_TEST__ -f 50 -r 50 
$(top_builddir) $(BOGO_SCTESTS_OUT) > $@
        chmod 755 $@
 
-$(SANE_SCTESTS_OUT): Dejagnu.sc check.sc
+submoviegetvartest-runner: submoviegetvar_testrunner.sh submoviegetvar.swf 
Makefile
+       sh submoviegetvar_testrunner.sh $(top_builddir) $(top_srcdir) 
submoviegetvar.swf > $@
+       chmod 755 $@
+
+$(SANE_SCTESTS_OUT) submoviegetvar.swf: Dejagnu.sc check.sc
 
 SUFFIXES = .sc .swf
 .sc.swf:
diff --git a/testsuite/misc-swfc.all/submoviegetvar.html 
b/testsuite/misc-swfc.all/submoviegetvar.html
new file mode 100644
index 0000000..6b164d9
--- /dev/null
+++ b/testsuite/misc-swfc.all/submoviegetvar.html
@@ -0,0 +1,190 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+<!--
+submoviegetvar.html - HTML-based semi-automated GetVariable()
+                      plugin function test
+
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+This test runner checks Gnash (or proprietary player) for:
+ * GetVariable() slash-colon variable path issue (bug #42395)
+       <https://savannah.gnu.org/bugs/?42395>
+
+Usage:
+    Open this file under web browser with JavaScript and plug-ins enabled,
+    and wait few seconds for the test to run. Once finished, the result
+    will be shown on browser screen.
+
+    When testing with proprietary player, the test directory might need
+    to be added as player's trusted location, or tests would fail with
+    odd errors caused by sandbox violation. Alternative is putting the
+    test directory on a web server and run the test online.
+
+Note:
+    This test runner does not count checks run inside SWF file,
+    since doing so requires cooperation from Dejagnu.sc
+
+Original author: Nutchanon Wetchasit <address@hidden>
+-->
+<html>
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+       <title>GetVariable() Plug-in Function Test</title>
+</head>
+<body>
+<div id="flashstate">
+       <noscript>
+               <strong>ERROR: JavaScript is not enabled, tests will not 
run</strong>
+       </noscript>
+</div>
+<object id="varsource" data="submoviegetvar.swf" width="320" height="240" 
type="application/x-shockwave-flash">
+       <param name="movie" value="submoviegetvar.swf">
+       <param name="AllowScriptAccess" value="always">
+       <div>
+               <strong>ERROR: SWF failed to load, tests will not run 
correctly</strong>
+       </div>
+</object>
+<script type="text/javascript">
+<!--
+       var tested=0;
+       var passed=0;
+       var failed=0;
+       var xpassed=0;
+       var xfailed=0;
+
+       function check_equals(op1,op2,msg) {
+               var flashstatus;
+               var failureline;
+
+               flashstatus=document.getElementById("flashstate");
+               tested++;
+               if(op1==op2) {
+                       passed++;
+                       
flashstatus.appendChild(document.createTextNode("PASSED: "+msg));
+               } else {
+                       failed++;
+                       failureline=document.createElement("strong");
+                       
failureline.appendChild(document.createTextNode("FAILED: "+msg+" (\""+op1+"\" 
!= \""+op2+"\")"));
+                       flashstatus.appendChild(failureline);
+               }
+               flashstatus.appendChild(document.createElement("br"));
+       }
+
+       function xcheck_equals(op1,op2,msg) {
+               var flashstatus;
+               var successline;
+
+               flashstatus=document.getElementById("flashstate");
+               tested++;
+               if(op1==op2) {
+                       xpassed++;
+                       successline=document.createElement("strong");
+                       
successline.appendChild(document.createTextNode("XPASSED: "+msg));
+                       flashstatus.appendChild(successline);
+               } else {
+                       xfailed++;
+                       
flashstatus.appendChild(document.createTextNode("XFAILED: "+msg+" (\""+op1+"\" 
!= \""+op2+"\")"));
+               }
+               flashstatus.appendChild(document.createElement("br"));
+       }
+
+       function check_error(msg) {
+               var flashstatus;
+               var errorline;
+
+               flashstatus=document.getElementById("flashstate");
+               errorline=document.createElement("strong");
+               errorline.appendChild(document.createTextNode("ERROR: "+msg));
+               flashstatus.appendChild(errorline);
+               flashstatus.appendChild(document.createElement("br"));
+       }
+
+       function check_totals(total) {
+               check_equals(tested,total,"There should be "+total+" tests 
run");
+       }
+
+       function checkvariable(varpath,refvalue) {
+               var flashstatus;
+               var varvalue;
+
+               try {
+                       
varvalue=document.getElementById("varsource").GetVariable(varpath);
+                       check_equals(varvalue,refvalue,"GetVariable call on 
\""+varpath+"\" path should return a correct value");
+               } catch(e) {
+                       check_error("Failed calling Flash\'s 
GetVariable(\""+varpath+"\") function: "+e);
+               }
+       }
+
+       function xcheckvariable(varpath,refvalue) {
+               var flashstatus;
+               var varvalue;
+
+               try {
+                       
varvalue=document.getElementById("varsource").GetVariable(varpath);
+                       xcheck_equals(varvalue,refvalue,"GetVariable call on 
\""+varpath+"\" path should return a correct value");
+               } catch(e) {
+                       check_error("Failed calling Flash\'s 
GetVariable(\""+varpath+"\") function: "+e);
+               }
+       }
+
+       function access_flash() {
+               checkvariable("movievar","This is movievar");
+               xcheckvariable(":movievar","This is movievar");
+               checkvariable("/:movievar","This is movievar");
+
+               checkvariable("submovie:submovievar","This is submovievar");
+               checkvariable("submovie/:submovievar","This is submovievar");
+               checkvariable("submovie::submovievar","This is submovievar");
+
+               checkvariable("/submovie:submovievar","This is submovievar");
+               checkvariable("/submovie/:submovievar","This is submovievar");
+               checkvariable("/submovie::submovievar","This is submovievar");
+
+               checkvariable(":submovie:submovievar","This is submovievar");
+               checkvariable(":submovie/:submovievar","This is submovievar");
+               checkvariable(":submovie::submovievar","This is submovievar");
+
+               checkvariable("submovie/nestedmovie:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("submovie/nestedmovie/:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("submovie/nestedmovie::nestedmovievar","This is 
nestedmovievar");
+               checkvariable("submovie:nestedmovie:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("submovie:nestedmovie/:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("submovie:nestedmovie::nestedmovievar","This is 
nestedmovievar");
+
+               checkvariable("/submovie/nestedmovie:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("/submovie/nestedmovie/:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("/submovie/nestedmovie::nestedmovievar","This is 
nestedmovievar");
+               checkvariable("/submovie:nestedmovie:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("/submovie:nestedmovie/:nestedmovievar","This is 
nestedmovievar");
+               checkvariable("/submovie:nestedmovie::nestedmovievar","This is 
nestedmovievar");
+
+               checkvariable(":submovie/nestedmovie:nestedmovievar","This is 
nestedmovievar");
+               checkvariable(":submovie/nestedmovie/:nestedmovievar","This is 
nestedmovievar");
+               checkvariable(":submovie/nestedmovie::nestedmovievar","This is 
nestedmovievar");
+               checkvariable(":submovie:nestedmovie:nestedmovievar","This is 
nestedmovievar");
+               checkvariable(":submovie:nestedmovie/:nestedmovievar","This is 
nestedmovievar");
+               checkvariable(":submovie:nestedmovie::nestedmovievar","This is 
nestedmovievar");
+
+               check_totals(30);
+       }
+
+       setTimeout("access_flash()",3000);
+//-->
+</script>
+</body>
+</html>
diff --git a/testsuite/misc-swfc.all/submoviegetvar.sc 
b/testsuite/misc-swfc.all/submoviegetvar.sc
new file mode 100644
index 0000000..632eeea
--- /dev/null
+++ b/testsuite/misc-swfc.all/submoviegetvar.sc
@@ -0,0 +1,61 @@
+// submoviegetvar.sc - Built-in GetVariable() plugin function tests
+//                     with nested MovieClip
+//
+//   Copyright (C) 2017 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+//
+// Note:
+//     This SWF file does not run any test by itself (apart from
+//     few sanity checks), as this is a test on plugin's host interface.
+//
+//     To run this test against proprietary player, use a HTML-based
+//     test runner "submoviegetvar.html".
+//
+// Original author: Nutchanon Wetchasit <address@hidden>
+//
+
+// Once this Flash movie is run, it stores string value to variable
+// inside root movie, first-level sub-MovieClip, and second-level
+// sub-MovieClip; which could be accessed by plugin's `GetVariable(path)`
+// function.
+
+.flash bbox=320x240 background=white version=7 fps=12
+.frame 1
+    .action:
+        #include "Dejagnu.sc"
+    .end
+    .sprite SubMovieClip
+        .frame 1
+            .sprite NestedMovieClip
+                .frame 1
+                    .action:
+                        var nestedmovievar="This is nestedmovievar";
+                        check(true);
+                    .end
+            .end
+            .put nestedmovie=NestedMovieClip
+            .action:
+                var submovievar="This is submovievar";
+                check(true);
+            .end
+    .end
+    .put submovie=SubMovieClip
+    .action:
+        var movievar="This is movievar";
+        check(true);
+        trace("ENDOFTEST");
+    .end
+.end
diff --git a/testsuite/misc-swfc.all/submoviegetvar_testrunner.sh 
b/testsuite/misc-swfc.all/submoviegetvar_testrunner.sh
new file mode 100644
index 0000000..bd34572
--- /dev/null
+++ b/testsuite/misc-swfc.all/submoviegetvar_testrunner.sh
@@ -0,0 +1,291 @@
+#!/bin/sh
+
+#
+# submoviegetvar_testrunner.sh - container-emulated, automated GetVariable()
+#     plugin function test generator for nested MovieClip scenario
+#
+# Copyright (C) 2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#
+# Original author: Nutchanon Wetchasit <address@hidden>
+#
+# This test runner checks Gnash for:
+#  * GetVariable() slash-colon variable path issue (bug #42395)
+#        <https://savannah.gnu.org/bugs/?42395>
+#
+# Usage:
+#     ./submoviegetvar_testrunner.sh <builddir> <srcdir> <swf>
+#
+# Generated test runner's exit codes:
+#     0         if tester ran completely
+#     non-zero  if tester encountered an error
+#
+# Note:
+#     The generated test file requires a filesystem that supports named pipes.
+#
+
+# Check for generation parameters
+while getopts "" name
+do
+       case $name in
+               ?)
+                       echo "Usage: $0 <builddir> <srcdir> <swf>" >&2
+                       exit 1;;
+       esac
+done
+shift $(($OPTIND - 1))
+if [ "$#" -ne 3 ]
+then
+       echo "Usage: $0 <builddir> <srcdir> <swf>" >&2
+       exit 1
+fi
+
+# Load generation parameters
+top_builddir=$1
+shift
+top_srcdir=$1
+shift
+swf=$1
+
+# Generate the test runner
+echo "#!/bin/sh"
+echo
+
+echo "# Environment variables"
+env | grep '^GNASH' | while read reply
+do
+       echo "export \"${reply}\""
+done
+
+cat << EOF
+
+# Filenames and constants
+LOGFILE=${top_builddir}/testoutlog.\$\$
+PIPE2CONTAINER=${top_builddir}/tocontainer.\$\$
+PIPE2PLAYER=${top_builddir}/toplayer.\$\$
+READTIMEOUT=5
+
+# Test counts
+TESTED=0
+FAILED=0
+PASSED=0
+XFAILED=0
+XPASSED=0
+
+# check_equals(\$op1, \$op2, \$msg)
+# Equality checker and counter
+check_equals() {
+       if [ "\$1" = "\$2" ]
+       then
+               echo "PASSED: \$3"
+               PASSED=\`expr "\$PASSED" + 1\`
+       else
+               echo "FAILED: \$3 (\"\$1\" != \"\$2\")"
+               FAILED=\`expr "\$FAILED" + 1\`
+       fi
+       TESTED=\`expr "\$TESTED" + 1\`
+}
+
+# xcheck_equals(\$op1, \$op2, \$msg)
+# Equality checker and counter (for expected failure)
+xcheck_equals() {
+       if [ "\$1" = "\$2" ]
+       then
+               echo "XPASSED: \$3"
+               PASSED=\`expr "\$PASSED" + 1\`
+       else
+               echo "XFAILED: \$3 (\"\$1\" != \"\$2\")"
+               FAILED=\`expr "\$FAILED" + 1\`
+       fi
+       TESTED=\`expr "\$TESTED" + 1\`
+}
+
+# check_totals(\$op, \$msg)
+# Test count checker
+check_totals() {
+       check_equals "\$TESTED" "\$1" "\$2"
+}
+
+# check_error(\$bool, \$msg)
+# Assert \$bool is 0; if not, flag error in the test, and exit
+check_error() {
+       if [ "\$1" -ne 0 ]
+       then
+               echo "ERROR: \$2" >&2
+               exit 1
+       fi
+}
+
+# read_timeout(\$varname, \$timeout)
+# Read one line from standard input, with a specified timeout (in seconds)
+read_timeout() {
+       trap 'trap - USR1; return 142' USR1
+       (sleep "\$2" && kill -USR1 "\$\$" > /dev/null 2>&1) &
+       TIMEOUTPID=\$!
+       read "\$1"
+       READERROR=\$?
+       kill "\$TIMEOUTPID" > /dev/null 2>&1
+       trap - USR1
+       return \$READERROR
+}
+
+# check_getvariable(\$varpath, \$varvalue)
+# Call GetVariable function in the player, and check return value against
+# the expected one
+check_getvariable() {
+       # Call string-returning GetVariable()
+       echo '<invoke name="GetVariable" 
returntype="xml"><arguments><string>'"\$1"'</string></arguments></invoke>' >&4
+
+       # Read for returned value statement
+       read_timeout LINE \$READTIMEOUT <&3
+       check_equals "\$LINE" '<string>'"\$2"'</string>' "Gnash should return a 
correct value from GetVariable(\"\$1\")"
+}
+
+# xcheck_getvariable(\$varpath, \$varvalue)
+# Call GetVariable function in the player, and check return value against
+# the expected one - hoping it is equal
+xcheck_getvariable() {
+       # Call string-returning GetVariable()
+       echo '<invoke name="GetVariable" 
returntype="xml"><arguments><string>'"\$1"'</string></arguments></invoke>' >&4
+
+       # Read for returned value statement
+       read_timeout LINE \$READTIMEOUT <&3
+       xcheck_equals "\$LINE" '<string>'"\$2"'</string>' "Gnash should return 
a correct value from GetVariable(\"\$1\")"
+}
+
+# Create required named pipes
+if [ \! -p "\$PIPE2CONTAINER" ]
+then
+       mkfifo "\$PIPE2CONTAINER"
+       check_error "\$?" "Failed to create a named pipe: \$PIPE2CONTAINER"
+fi
+if [ \! -p "\$PIPE2PLAYER" ]
+then
+       mkfifo "\$PIPE2PLAYER"
+       check_error "\$?" "Failed to create a named pipe: \$PIPE2PLAYER"
+fi
+
+# Open player-to-host pipe
+exec 3<> "\$PIPE2CONTAINER"
+check_error \$? "Failed to open a named pipe: \$PIPE2CONTAINER"
+
+# Open host-to-player pipe
+exec 4<> "\$PIPE2PLAYER"
+check_error \$? "Failed to open a named pipe: \$PIPE2PLAYER"
+
+# Start player
+"${top_builddir}/gui/gnash" -r 0 -vv -F 3:4 "${swf}" > "\$LOGFILE" 2>&1 &
+GNASHPID=\$!
+
+# Wait until the SWF code finish running, by loop-checking logfile
+STARTCOUNTDOWN=\$READTIMEOUT
+while [ \$STARTCOUNTDOWN -gt 0 ]
+do
+       if grep "TRACE: ENDOFTEST" "\$LOGFILE" 2>&1 > /dev/null
+       then
+               break
+       fi
+       sleep 1
+       STARTCOUNTDOWN=\`expr \$STARTCOUNTDOWN - 1\`
+done
+
+[ \$STARTCOUNTDOWN -ne 0 ]
+check_equals \$? 0 "Gnash-side ActionScript code should be successfully run"
+
+# Test running GetVariable() on root movie's variable
+
+check_getvariable "movievar" "This is movievar"
+xcheck_getvariable ":movievar" "This is movievar"
+check_getvariable "/:movievar" "This is movievar"
+
+# Test running GetVariable() on first-level sub-MovieClip's variable
+
+check_getvariable "submovie:submovievar" "This is submovievar"
+check_getvariable "submovie/:submovievar" "This is submovievar"
+check_getvariable "submovie::submovievar" "This is submovievar"
+
+check_getvariable "/submovie:submovievar" "This is submovievar"
+check_getvariable "/submovie/:submovievar" "This is submovievar"
+check_getvariable "/submovie::submovievar" "This is submovievar"
+
+check_getvariable ":submovie:submovievar" "This is submovievar"
+check_getvariable ":submovie/:submovievar" "This is submovievar"
+check_getvariable ":submovie::submovievar" "This is submovievar"
+
+# Test running GetVariable() on second-level sub-MovieClip's variable
+
+check_getvariable "submovie/nestedmovie:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "submovie/nestedmovie/:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "submovie/nestedmovie::nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "submovie:nestedmovie:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "submovie:nestedmovie/:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "submovie:nestedmovie::nestedmovievar" "This is 
nestedmovievar"
+
+check_getvariable "/submovie/nestedmovie:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "/submovie/nestedmovie/:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "/submovie/nestedmovie::nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "/submovie:nestedmovie:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "/submovie:nestedmovie/:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable "/submovie:nestedmovie::nestedmovievar" "This is 
nestedmovievar"
+
+check_getvariable ":submovie/nestedmovie:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable ":submovie/nestedmovie/:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable ":submovie/nestedmovie::nestedmovievar" "This is 
nestedmovievar"
+check_getvariable ":submovie:nestedmovie:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable ":submovie:nestedmovie/:nestedmovievar" "This is 
nestedmovievar"
+check_getvariable ":submovie:nestedmovie::nestedmovievar" "This is 
nestedmovievar"
+
+# Close pipes
+exec 3<&-
+exec 4<&-
+
+# Force Gnash to exit
+kill \$GNASHPID
+wait \$GNASHPID
+
+# Show player-side output
+exec 5< "\$LOGFILE"
+cat <&5
+exec 5<&-
+
+# Include total number of tests from player side
+exec 5< "\$LOGFILE"
+PLAYERPASSED=\`grep "TRACE: PASSED:" <&5 | wc -l\`
+exec 5<&-
+exec 5< "\$LOGFILE"
+PLAYERXPASSED=\`grep "TRACE: XPASSED:" <&5 | wc -l\`
+exec 5<&-
+exec 5< "\$LOGFILE"
+PLAYERFAILED=\`grep "TRACE: FAILED:" <&5 | wc -l\`
+exec 5<&-
+exec 5< "\$LOGFILE"
+PLAYERXFAILED=\`grep "TRACE: XFAILED:" <&5 | wc -l\`
+exec 5<&-
+PASSED=\`expr "\$PASSED" + "\$PLAYERPASSED"\`
+XPASSED=\`expr "\$XPASSED" + "\$PLAYERXPASSED"\`
+FAILED=\`expr "\$FAILED" + "\$PLAYERFAILED"\`
+XFAILED=\`expr "\$XFAILED" + "\$PLAYERXFAILED"\`
+TESTED=\`expr "\$TESTED" + "\$PLAYERPASSED" + "\$PLAYERXPASSED" + 
"\$PLAYERFAILED" + "\$PLAYERXFAILED"\`
+
+# Check for total number of test run
+check_totals "34" "There should be 34 tests run"
+
+# Remove temporary files
+rm "\$LOGFILE"
+rm "\$PIPE2CONTAINER"
+rm "\$PIPE2PLAYER"
+EOF

-----------------------------------------------------------------------

Summary of changes:
 testsuite/misc-swfc.all/Makefile.am                |   13 +-
 testsuite/misc-swfc.all/submoviegetvar.html        |  190 +++++++++++++
 testsuite/misc-swfc.all/submoviegetvar.sc          |   61 ++++
 .../misc-swfc.all/submoviegetvar_testrunner.sh     |  291 ++++++++++++++++++++
 4 files changed, 552 insertions(+), 3 deletions(-)
 create mode 100644 testsuite/misc-swfc.all/submoviegetvar.html
 create mode 100644 testsuite/misc-swfc.all/submoviegetvar.sc
 create mode 100644 testsuite/misc-swfc.all/submoviegetvar_testrunner.sh


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]