gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/rtra...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/rtra...
Date: Tue, 19 Sep 2006 17:34:38 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/09/19 17:34:38

Modified files:
        .              : ChangeLog 
Added files:
        testsuite/actionscript.all: rtrace.as testreport.php 

Log message:
        code for online testcases automation.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.871&r2=1.872
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/rtrace.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/testreport.php?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.871
retrieving revision 1.872
diff -u -b -r1.871 -r1.872
--- ChangeLog   19 Sep 2006 15:02:16 -0000      1.871
+++ ChangeLog   19 Sep 2006 17:34:38 -0000      1.872
@@ -1,5 +1,8 @@
 2006-09-19 Sandro Santilli  <address@hidden>
 
+       * testsuite/actionscript.all/rtrace.as,
+         testsuite/actionscript.all/testreport.php:
+         code for online testcases automation.
        * server/asobj/Math.cpp: added missing "log.h" include
        * backend/render_handler_ogl.cpp: hush little compiler
          (use explicit const_cast)

Index: testsuite/actionscript.all/rtrace.as
===================================================================
RCS file: testsuite/actionscript.all/rtrace.as
diff -N testsuite/actionscript.all/rtrace.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/actionscript.all/rtrace.as        19 Sep 2006 17:34:38 -0000      
1.1
@@ -0,0 +1,79 @@
+// 
+//   Copyright (C) 2005, 2006 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 2 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
+
+// Linking Gnash statically or dynamically with other modules is making a
+// combined work based on Gnash. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Gnash give you
+// permission to combine Gnash with free software programs or libraries
+// that are released under the GNU LGPL and with code included in any
+// release of Talkback distributed by the Mozilla Foundation. You may
+// copy and distribute such a system following the terms of the GNU GPL
+// for all but the LGPL-covered parts and Talkback, and following the
+// LGPL for the LGPL-covered parts.
+//
+// Note that people who make modified versions of Gnash are not obligated
+// to grant this special exception for their modified versions; it is their
+// choice whether to do so. The GNU General Public License gives permission
+// to release a modified version without this exception; this exception
+// also makes it possible to release a modified version which carries
+// forward this exception.
+//
+
+#ifndef _RTRACE_AS_
+#define _RTRACE_AS_
+
+#ifndef USE_RTRACE
+// Set the URL to the location of the testreport.php script
+// (you should really set USE_RTRACE before including this file though)
+#define USE_RTRACE "http://localhost/testreport.php";;
+#endif
+
+var traced = "";
+
+rtrace = function (msg) 
+{
+       last_trace_time = getTimer();
+       traced += msg+"\n";
+};
+
+
+report = function()
+{
+       var url = USE_RTRACE;
+       getUrl(url, 'report', 'POST');
+};
+
+var last_trace_time = getTimer();
+
+//
+// getTimer() return milliseconde, so
+// we send the report after 1 second of inactivity
+// and check for it every 1/2 seconds
+//
+var interval = setInterval(
+       function() {
+               if (getTimer() - last_trace_time > 100 ) { 
+                       clearInterval(interval);
+                       report();
+               }
+       },
+500);
+
+#endif // _RTRACE_AS_

Index: testsuite/actionscript.all/testreport.php
===================================================================
RCS file: testsuite/actionscript.all/testreport.php
diff -N testsuite/actionscript.all/testreport.php
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/actionscript.all/testreport.php   19 Sep 2006 17:34:38 -0000      
1.1
@@ -0,0 +1,35 @@
+<?php
+
+# This simple script is intended for use with the online
+# ActionScript testcases of Gnash. The testcases will POST
+# to this file for logging run results
+
+# Set the log filename
+$filename = "/tmp/gnashtestreport.txt";
+
+# Set the url corrisponding to the log filename
+$url = "file:///tmp/gnashtestreport.txt";
+
+function print_it($msg)
+{
+       global $logfile;
+       fwrite($logfile, $msg);
+}
+
+function report()
+{
+       global $HTTP_POST_VARS;
+       global $logfile;
+
+       print_it("\n[".gmdate("M d Y H:i:s")."]\n");
+       print_it($HTTP_POST_VARS{'traced'});
+}
+
+$logfile = fopen($filename, "a+");
+# todo: check return from fopen()
+report();
+
+echo "<B>Your tests results have been <A HREF=".$url.">logged</A>, thanks a 
lot.</B>"
+
+
+?>




reply via email to

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