gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/simple.exp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/simple.exp
Date: Wed, 29 Nov 2006 12:38:42 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/11/29 12:38:42

Modified files:
        .              : ChangeLog 
        testsuite      : simple.exp 

Log message:
                * testsuite/simple.exp: handle premature death and non-zero
                  return of testcases.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1817&r2=1.1818
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/simple.exp?cvsroot=gnash&r1=1.6&r2=1.7

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1817
retrieving revision 1.1818
diff -u -b -r1.1817 -r1.1818
--- ChangeLog   29 Nov 2006 10:59:20 -0000      1.1817
+++ ChangeLog   29 Nov 2006 12:38:41 -0000      1.1818
@@ -1,5 +1,7 @@
 2006-11-29 Sandro Santilli <address@hidden>
 
+       * testsuite/simple.exp: handle premature death and non-zero
+         return of testcases.
        * testsuite/misc-ming.all/DefineEditTextVariableNameTest.c:
          Add tests for dynamically changing a TextField's variable name.
        * testsuite/misc-ming.all/DefineEditTextVariableNameTest-Runner.cpp

Index: testsuite/simple.exp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/simple.exp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- testsuite/simple.exp        25 Nov 2006 13:09:47 -0000      1.6
+++ testsuite/simple.exp        29 Nov 2006 12:38:42 -0000      1.7
@@ -21,7 +21,11 @@
 
     # spawn the executable and look for the DejaGnu output messages from the
     # test case.
-    spawn -noecho -open [open "|./$file" "r"]
+
+    # this version of the call allows use of 'wait' to check return code
+    # -open [open "|cmd" "r"] doesn't work for that
+    spawn -noecho ./$file 
+
     expect {
        -re "NOTE:\[^\n]*\n" {
            regsub "\[\n\t\]*NOTE: " $expect_out(0,string) "" output
@@ -76,9 +80,9 @@
            verbose "All done" 2
        }
        eof {
-           #       unresolved "${executable} died prematurely"
+           #       unresolved "${file} died prematurely"
            #       catch close
-           #       return "${executable} died prematurely"
+           #       return "${file} died prematurely"
        }
        timeout {
            warning "Timed out executing test case"
@@ -92,6 +96,22 @@
        }
    }
 
+       # wait for the process to coplete to
+       # check return code
+       set retcode [wait]
+
+       # debugging
+       #set i 0; foreach j $retcode { print "${file} wait($i) $j"; incr i }
+
+       if { [ llength $retcode ] > 5 } {
+               fail "${file} died prematurely ([lindex $retcode 6])"
+       }
+       if { [ lindex $retcode 3 ] != 0 } {
+               fail "${file} exited with non-zero code ([lindex $retcode 3])"
+       }
+
+
+
     # force a close of the executable to be safe.
     catch close
 }




reply via email to

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