[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-ming.all Makefile.am ming.exp
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash/testsuite/misc-ming.all Makefile.am ming.exp |
Date: |
Thu, 12 Oct 2006 23:50:44 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Rob Savoye <rsavoye> 06/10/12 23:50:44
Modified files:
testsuite/misc-ming.all: Makefile.am
Added files:
testsuite/misc-ming.all: ming.exp
Log message:
i * testsuite/misc-ming/Makefile.am: Redefine the check-DEJAGNU
target
to execute the testcase directly if DejaGnu isn't installed.
* testsuite/misc-ming/ming.exp: New test driver for Ming tests.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/ming.exp?cvsroot=gnash&rev=1.1
Patches:
Index: Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- Makefile.am 12 Oct 2006 11:39:45 -0000 1.18
+++ Makefile.am 12 Oct 2006 23:50:44 -0000 1.19
@@ -37,10 +37,7 @@
#
-AUTOMAKE_OPTIONS = # dejagnu
-
-# We don't need --tool anymore
-RUNTESTDEFAULTFLAGS =
+AUTOMAKE_OPTIONS = dejagnu
if ENABLE_MING
@@ -55,7 +52,7 @@
$(NULL)
-check_PROGRAMS = \
+noinst_PROGRAMS = \
moviecliploader_test \
definebitsjpeg2 \
DefineEditTextTest \
@@ -65,9 +62,9 @@
PlaceObject2Test \
RemoveObject2Test
-TESTS = \
- DefineEditTextVariableNameTest-Runner
+# TESTS = \
+# DefineEditTextVariableNameTest-Runner
definebitsjpeg2_SOURCES = definebitsjpeg2.c
definebitsjpeg2_LDADD = $(MING_LIBS)
@@ -136,5 +133,26 @@
clean-local:
-rm *.swf media
+
+TEST_DRIVERS = ming.exp
+TEST_CASES = DefineEditTextVariableNameTest-Runner
+
+check-DEJAGNU: site-update $(noinst_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 "$(noinst_PROGRAMS)"; 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: ming.exp
===================================================================
RCS file: ming.exp
diff -N ming.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ming.exp 12 Oct 2006 23:50:44 -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
+}
+
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/testsuite/misc-ming.all Makefile.am ming.exp,
Rob Savoye <=