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/chec...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/chec...
Date: Thu, 16 Nov 2006 18:46:13 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/11/16 18:46:13

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: check.as dejagnu_so_init.as 

Log message:
                * testsuite/actionscript.all/check.as: moved most dejagnu_so
                  specific code.
                * testsuite/actionscript.all/dejagnu_so_init.as:
                  take slowness of loading into account by using a frameloop
                  waiting for dejagnu module to be initialized, with a timeout
                  to fallback to 'trace' mode.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1632&r2=1.1633
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/check.as?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/dejagnu_so_init.as?cvsroot=gnash&r1=1.4&r2=1.5

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1632
retrieving revision 1.1633
diff -u -b -r1.1632 -r1.1633
--- ChangeLog   16 Nov 2006 14:22:32 -0000      1.1632
+++ ChangeLog   16 Nov 2006 18:46:13 -0000      1.1633
@@ -1,5 +1,14 @@
 2006-11-16 Sandro Santilli <address@hidden>
 
+       * testsuite/actionscript.all/check.as: moved most dejagnu_so
+         specific code.
+       * testsuite/actionscript.all/dejagnu_so_init.as:
+         take slowness of loading into account by using a frameloop
+         waiting for dejagnu module to be initialized, with a timeout
+         to fallback to 'trace' mode.
+
+2006-11-16 Sandro Santilli <address@hidden>
+
        * testsuite/misc-ming.all/ming_utils.c
          (add_xtrace_function):
          don't duplicate visual traces to trace channel;

Index: testsuite/actionscript.all/check.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/check.as,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- testsuite/actionscript.all/check.as 16 Nov 2006 14:22:32 -0000      1.13
+++ testsuite/actionscript.all/check.as 16 Nov 2006 18:46:13 -0000      1.14
@@ -21,18 +21,9 @@
 #ifndef _CHECK_AS_
 #define _CHECK_AS_
 
-// ONLINE mode uses XTRACE
+// ONLINE mode uses DEJAGNU module
 #ifdef ONLINE
-# define USE_RTRACE "http://localhost/testreport.php";
-//# define USE_XTRACE
-#endif
-
-// Define USE_XTRACE to use "visual" trace
-#ifdef USE_XTRACE
-// This is obsoleted, use USE_DEJAGNU_MODULE insted
-//# include "xtrace.as"
-//# define trace xtrace
-#define USE_DEJAGNU_MODULE 1
+# define USE_DEJAGNU_MODULE
 #endif
 
 // Use facilities provided by dejagnu shared library module
@@ -42,65 +33,14 @@
 //       and put dejagnu_so_fini.as in last frame.
 #ifdef USE_DEJAGNU_MODULE
 
-// When using ming-0.4.0beta or prior, the __shared_assets
-// movieclip will NOT be usable, thus we fallback to using
-// bare 'trace' function
-
-if ( ! dejagnu_module_initialized )
-{
-       trace("No properly initialized dejagnu module found.\n"
-               + " Possible reasons are:\n"
-               + " 1) this testcase was compiled using a bogus\n"
-               + "    makeswf version (up to Ming-0.4.0beta2).\n"
-               + " 2) You are using a player with bogus IMPORT \n"
-               + "    tag handling (actions in the imported movie \n"
-               + "    have not been run yet and we should be in frame2\n"
-               + "    of the importer movie so far).\n"
-               + " 4) The Dejagnu.swf file is corrupted or was not found\n"
-               + "    where expected.\n"
-               + "In any case, we will fallback to trace mode\n\n" );
-}
-else
-{
-       info = function(msg) {
-               xtrace(msg);
-               trace(msg);
-       };
-       pass_check = function (msg) {
-               pass(msg);
-       };
-       xpass_check = function (msg) {
-               xpass(msg);
-       };
-       fail_check = function (msg) {
-               fail(msg);
-       };
-       xfail_check = function (msg) {
-               xfail(msg);
-       };
-}
-
 # define trace(x) info(msg)
 
 #else // ndef USE_DEJAGNU_MODULE
 
-// Define USE_RTRACE to use "report" trace
-#ifdef USE_RTRACE
-# include "rtrace.as"
-# define trace rtrace
-#endif
-
-// ONLINE mode only prints failures
-#ifdef ONLINE
-# undef pass_check
-#else
-# define pass_check(text) trace("PASSED: "+text)
-# define xpass_check(text) trace("XPASSED: "+text)
-#endif
-
+#define pass_check(text) trace("PASSED: "+text)
+#define xpass_check(text) trace("XPASSED: "+text)
 #define fail_check(text) trace("FAILED: "+text)
 #define xfail_check(text) trace("XFAILED: "+text)
-
 #define info(x) trace(x)
 
 

Index: testsuite/actionscript.all/dejagnu_so_init.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/dejagnu_so_init.as,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- testsuite/actionscript.all/dejagnu_so_init.as       16 Nov 2006 14:00:20 
-0000      1.4
+++ testsuite/actionscript.all/dejagnu_so_init.as       16 Nov 2006 18:46:13 
-0000      1.5
@@ -3,6 +3,11 @@
 //       prevent __shared_assets clip to work (the movieclip
 //       will be published with a frame-count of 0, thus
 //       actions in it will *NOT* be executed)
+//      We handle this by falling back to 'trace' mode if
+//       dejagnu module is not initialized after  'timeout' frames
+//      in a frameloop.
+
+this.timeout = 10; // 10 frames of timeout
 
 
 // By default 'makeswf' makes the __shared_assets clip invisible,
@@ -15,3 +20,82 @@
 {
        trace("__shared_assets undefined: did you run 'makeswf' with 
-i<path_to_Dejagnu.swf>:dejagnu ?");
 }
+
+this.framec = 0;
+this.onEnterFrame = function() {
+       if ( _root.dejagnu_module_initialized )
+       {
+               // disable frameloop
+               this.onEnterFrame = undefined;
+
+               // setup some dejagnu wrappers
+               info = function(msg) {
+                       xtrace(msg);
+                       trace(msg);
+               };
+               pass_check = function (msg) {
+                       pass(msg);
+               };
+               xpass_check = function (msg) {
+                       xpass(msg);
+               };
+               fail_check = function (msg) {
+                       fail(msg);
+               };
+               xfail_check = function (msg) {
+                       xfail(msg);
+               };
+
+               // make __shared_assets visible (in case it didnt' work before)
+               __shared_assets._visible = true;
+
+               // jump to next frame
+               gotoAndPlay(1);
+       }
+       else if ( ++this.framec > this.timeout )
+       {
+               // disable frameloop
+               this.onEnterFrame = undefined;
+
+               // complain
+               trace("No properly initialized dejagnu module found after "
+                       + this.timeout + " frame loops.\n"
+                       + " Possible reasons are:\n"
+                       + " 1) this testcase was compiled using a bogus\n"
+                       + "    makeswf version (up to Ming-0.4.0beta2).\n"
+                       + " 2) You are using a player with bogus IMPORT \n"
+                       + "    tag handling (actions in the imported movie \n"
+                       + "    have not been run yet and we should be in 
frame2\n"
+                       + "    of the importer movie so far).\n"
+                       + " 4) The Dejagnu.swf file is corrupted or was not 
found\n"
+                       + "    where expected.\n"
+                       + "In any case, we will fallback to trace mode\n\n" );
+
+               // provide fall-back functions
+               info = function(msg) {
+                       trace(msg);
+               };
+               pass_check = function (msg) {
+                       trace('PASSED: '+msg);
+               };
+               xpass_check = function (msg) {
+                       trace('XPASSED: '+msg);
+               };
+               fail_check = function (msg) {
+                       trace('FAILED: '+msg);
+               };
+               xfail_check = function (msg) {
+                       trace('XFAILED: '+msg);
+               };
+
+               // jump to next frame
+               gotoAndPlay(1);
+       }
+       else
+       {
+               var retries = this.timeout - this.framec;
+               trace("Dejagnu not initialized yet at frame " + framec +" will 
try again for another frame");
+       }
+};
+
+stop();




reply via email to

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