gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog configure.ac testsuite/Makefile...
Date: Tue, 24 Oct 2006 13:19:36 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/10/24 13:19:36

Modified files:
        .              : ChangeLog configure.ac 
        testsuite      : Makefile.am 
Added files:
        testsuite/samples: Makefile.am clip_as_button2-TestRunner.cpp 
                           samples.exp 

Log message:
                * testsuite/samples/samples.exp: dejagnu driver for
                  tests in sample dir (actually a copy of ming.exp)
                * configure.ac, testsuite/Makefile.am,
                  testsuite/samples/Makefile.am: enable Makefile
                  under testsuite/samples dir.
                * testsuite/samples/clip_as_button2-TestRunner.cpp:
                  added test runner for clip_as_button2.swf

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1382&r2=1.1383
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.184&r2=1.185
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/Makefile.am?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/Makefile.am?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/clip_as_button2-TestRunner.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/samples/samples.exp?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1382
retrieving revision 1.1383
diff -u -b -r1.1382 -r1.1383
--- ChangeLog   24 Oct 2006 12:59:00 -0000      1.1382
+++ ChangeLog   24 Oct 2006 13:19:35 -0000      1.1383
@@ -1,3 +1,13 @@
+2006-10-25 Sandro Santilli <address@hidden>
+
+       * testsuite/samples/samples.exp: dejagnu driver for
+         tests in sample dir (actually a copy of ming.exp)
+       * configure.ac, testsuite/Makefile.am,
+         testsuite/samples/Makefile.am: enable Makefile 
+         under testsuite/samples dir.
+       * testsuite/samples/clip_as_button2-TestRunner.cpp:
+         added test runner for clip_as_button2.swf
+
 2006-10-24 Udo Giacomozzi <address@hidden>
 
        * backend/render_handler_agg.cpp: Fix typos.

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -b -r1.184 -r1.185
--- configure.ac        23 Oct 2006 22:52:19 -0000      1.184
+++ configure.ac        24 Oct 2006 13:19:35 -0000      1.185
@@ -33,7 +33,7 @@
 dnl also makes it possible to release a modified version which carries
 dnl forward this exception.
 
-dnl $Id: configure.ac,v 1.184 2006/10/23 22:52:19 nihilus Exp $
+dnl $Id: configure.ac,v 1.185 2006/10/24 13:19:35 strk Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, 0.7.1-cvs)
@@ -738,6 +738,7 @@
 testsuite/Makefile
 testsuite/libbase/Makefile
 testsuite/actionscript.all/Makefile
+testsuite/samples/Makefile
 testsuite/misc-ming.all/Makefile
 testsuite/server/Makefile
 plugin/Makefile

Index: testsuite/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- testsuite/Makefile.am       15 Oct 2006 15:57:42 -0000      1.18
+++ testsuite/Makefile.am       24 Oct 2006 13:19:36 -0000      1.19
@@ -5,6 +5,7 @@
        .                       \
        libbase                 \
        server                  \
+       samples                 \
        misc-ming.all           \
        actionscript.all        \
        $(NULL)

Index: testsuite/samples/Makefile.am
===================================================================
RCS file: testsuite/samples/Makefile.am
diff -N testsuite/samples/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/samples/Makefile.am       24 Oct 2006 13:19:36 -0000      1.1
@@ -0,0 +1,103 @@
+## Process this fill with automake to generate Makefile.in
+# 
+# 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.
+
+#
+
+AUTOMAKE_OPTIONS = dejagnu
+
+if ENABLE_MING
+
+CLEANFILES =  \
+      gnash-dbg.log \
+      site.exp.bak \
+      testrun.sum \
+      testrun.log
+
+
+INCLUDES = -I.. \
+        -I$(top_srcdir)                \
+        -I$(top_srcdir)/libbase \
+        -I$(top_srcdir)/server  \
+        -I$(top_srcdir)/server/parser  \
+        -I$(top_srcdir)/libgeometry \
+        -I$(top_srcdir)/testsuite \
+        $(MING_CFLAGS) \
+       $(NULL)
+
+
+check_PROGRAMS = \
+       clip_as_button2-TestRunner \
+       $(NULL)
+
+clip_as_button2_TestRunner_SOURCES = \
+       clip_as_button2-TestRunner.cpp \
+       $(NULL)
+clip_as_button2_TestRunner_LDADD = \
+       $(top_builddir)/testsuite/libtestsuite.la \
+       $(NULL)
+clip_as_button2_TestRunner_CXXFLAGS = \
+       -DSRCDIR='"$(srcdir)"' \
+       $(NULL)
+clip_as_button2_TestRunner_DEPENDENCIES = \
+       clip_as_button2.swf \
+       $(NULL)
+
+clean-local: 
+
+TEST_DRIVERS = samples.exp
+TEST_CASES = \
+       clip_as_button2-TestRunner
+
+check-DEJAGNU: site-update $(check_PROGRAMS)
+       @runtest=$(RUNTEST); \
+       if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+           $$runtest $(RUNTESTFLAGS) $(TEST_DRIVERS); \
+       else \
+         echo "WARNING: could not find \`runtest'" 1>&2; \
+          for i in "$(TEST_CASES)"; do \
+           $(SHELL) $$i; \
+         done; \
+       fi
+
+site-update: site.exp
+       @rm -fr site.exp.bak
+       @cp site.exp site.exp.bak
+       @sed -e '/testcases/d' site.exp.bak > site.exp
+       @echo "# This is a list of the pre-compiled testcases" >> site.exp
+       @echo "set testcases \"$(TEST_CASES)\"" >> site.exp
+endif
+

Index: testsuite/samples/clip_as_button2-TestRunner.cpp
===================================================================
RCS file: testsuite/samples/clip_as_button2-TestRunner.cpp
diff -N testsuite/samples/clip_as_button2-TestRunner.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/samples/clip_as_button2-TestRunner.cpp    24 Oct 2006 13:19:36 
-0000      1.1
@@ -0,0 +1,199 @@
+/* 
+ *   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.
+ *
+ */ 
+
+#define INPUT_FILENAME "clip_as_button2.swf"
+
+#include "MovieTester.h"
+#include "sprite_instance.h"
+#include "character.h"
+#include "dlist.h"
+#include "container.h"
+#include "log.h"
+
+#include "check.h"
+#include <string>
+#include <cassert>
+
+using namespace gnash;
+using namespace std;
+
+int
+main(int /*argc*/, char** /*argv*/)
+{
+       string filename = string(SRCDIR) + string("/") + string(INPUT_FILENAME);
+       MovieTester tester(filename);
+
+       // TODO: check why we need this !!
+       //       I wouldn't want the first advance to be needed
+       tester.advance();
+
+       dbglogfile.setVerbosity(1);
+
+       sprite_instance* root = tester.getRootMovie();
+       assert(root);
+
+       check_equals(root->get_frame_count(), 1);
+
+       string msg_empty;
+       string msg_topleft = "movie clip pressed";
+       string msg_topright = "button pressed";
+       string msg_botleft = "big movie clip pressed";
+       string msg_botright = "small movie clip pressed";
+
+       const character* text = tester.findDisplayItemByDepth(*root, 3);
+       check(text);
+       check_equals(string(text->get_text_value()), msg_empty);
+       check(!tester.isMouseOverMouseEntity());
+
+       // click in top-left movie clip circle
+       tester.movePointerTo(176, 92);
+       check(tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is gray
+       check_equals(string(text->get_text_value()), msg_topleft);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click "near" the top-left clip
+       // (ie: inside it's boundin box, but not on the shape)
+       tester.movePointerTo(143, 60);
+       check(!tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is white
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is white
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.depressMouseButton();
+
+       // click in top-right movie clip circle
+       tester.movePointerTo(427, 98);
+       check(tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is green
+       check_equals(string(text->get_text_value()), msg_topright);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is blue
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click "near" the top-right clip
+       // (ie: inside it's boundin box, but not on the shape)
+       tester.movePointerTo(385, 56);
+       check(!tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is white
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is white
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.depressMouseButton();
+
+       // click in bottom-left movie clip square
+       tester.movePointerTo(68, 281);
+       check(tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_botleft);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click near the bottom-left movie clip circle
+       tester.movePointerTo(140, 251);
+       check(tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_botleft);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click in the bottom-left movie clip circle
+       tester.movePointerTo(168, 283);
+       check(tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_botleft);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click in bottom-right movie clip square
+       tester.movePointerTo(330, 284);
+       check(!tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click near the bottom-right movie clip circle
+       check(!tester.isMouseOverMouseEntity());
+       tester.movePointerTo(404, 252);
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is light blue
+       check_equals(string(text->get_text_value()), msg_empty);
+
+       // click in the bottom-right movie clip circle
+       tester.movePointerTo(434, 291);
+       check(tester.isMouseOverMouseEntity());
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_empty);
+       tester.pressMouseButton();
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_botright);
+       tester.depressMouseButton();
+       //TODO: check color under the pixel is yellow
+       check_equals(string(text->get_text_value()), msg_empty);
+
+}
+

Index: testsuite/samples/samples.exp
===================================================================
RCS file: testsuite/samples/samples.exp
diff -N testsuite/samples/samples.exp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/samples/samples.exp       24 Oct 2006 13:19:36 -0000      1.1
@@ -0,0 +1,88 @@
+
+load_lib "dejagnu.exp"
+
+
+# If tracing has been enabled at the top level, then turn it on here
+# too.
+if $tracelevel {
+    strace $tracelevel
+}
+
+set timeoutmsg "Timed out: Never got started, "
+set timeout 100
+set file all
+set timetol 0
+set params ""
+
+# testcases is set by the Makefile in the site.exp data file.
+foreach file $testcases {
+    # spawn the executable and look for the DejaGnu output messages from the
+    # test case.
+    spawn -noecho -open [open "|./$file" "r"]
+    expect {
+       -re "\[0-9\]\[0-9\]:..:..:${text}\n" {
+           regsub "\[\n\t\]*NOTE: $text\n" $expect_out(0,string) "" output
+           verbose "$output" 3
+           set timetol 0
+           exp_continue
+       }
+       -re "NOTE:\[^\n]*\n" {
+           regsub "\[\n\t\]*NOTE: " $expect_out(0,string) "" output
+           set output [string range $output 6 end-2]
+           verbose "${file} $output" 2
+           set timetol 0
+           exp_continue
+       }
+       -re "PASSED:\[^\n]*\n" {
+           regsub "\[\n\t\]*PASSED: " $expect_out(0,string) "" output
+           set output [string range $output 0 end-2]
+           pass "${file}: $output"
+           set timetol 0
+           exp_continue
+       }
+       -re "FAILED:\[^\n\]*\n" {
+           regsub "\[\n\t\]*FAILED: " $expect_out(0,string) "" output
+           set output [string range $output 0 end-2] 
+           fail "${file}: $output"
+           set timetol 0
+           exp_continue
+       }
+       -re "UNTESTED:\[^\n]*\n" {
+           regsub "\[\n\t\]*TESTED: " $expect_out(0,string) "" output
+           set output [string range $output 8 end-2]
+           untested "${file}: $output"
+           set timetol 0
+           exp_continue
+       }
+       -re "UNRESOLVED:\[^\n]*\n" {
+           regsub "\[\n\t\]*UNRESOLVED: " $expect_out(0,string) "" output
+           set output [string range $output 8 end-2]
+           unresolved "${file}: $output"
+           set timetol 0
+           exp_continue
+       }
+       -re "Totals" {
+           verbose "All done" 2
+       }
+       eof {
+           #       unresolved "${executable} died prematurely"
+           #       catch close
+           #       return "${executable} died prematurely"
+       }
+       timeout {
+           warning "Timed out executing test case"
+           if { $timetol <= 2 } {
+               incr timetol
+               exp_continue
+           } else {
+               -               catch close
+               return "Timed out executing test case"
+           }
+       }
+   }
+
+    # force a close of the executable to be safe.
+    catch close
+}
+
+




reply via email to

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