diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | doc/runtest.1 | 16 | ||||
-rw-r--r-- | lib/framework.exp | 2 | ||||
-rw-r--r-- | runtest.exp | 11 |
5 files changed, 36 insertions, 13 deletions
@@ -1,3 +1,12 @@ +2016-02-15 Ben Elliston <bje@gnu.org> + + * runtest.exp: Enable --status by default. + (runtest): Set exit status to 2 if there is any error sourcing + the Tcl scripts. + * lib/framework.exp (unknown): Likewise, set exit status to 2. + * doc/runtest.1: Clarify exit status codes. + * NEWS: Update. + 2016-02-17 Ben Elliston <bje@gnu.org> * lib/remote.exp (local_exec): Call exp_continue until eof is @@ -1,6 +1,15 @@ -* text -*- -Changes since 1.5: +Changes since 1.5.3: + +1. The --status command line option is now the default. This means + that any error in the testsuite Tcl scripts will cause runtest to + abort with exit status code 2. +2. runtest now exits with exit code 0 if the testsuite "passed", 1 if + something unexpected happened (eg, FAIL, XPASS or UNRESOLVED), and + 2 if an exception is raised by the Tcl interpreter. +3. runtest now exits with the standard exit codes of programs that are + terminated by the SIGINT, SIGTERM and SIGQUIT signals. Changes since 1.4.4: diff --git a/doc/runtest.1 b/doc/runtest.1 index 4ef5297..0212342 100644 --- a/doc/runtest.1 +++ b/doc/runtest.1 @@ -109,14 +109,20 @@ prompt. Any file name on the command line is assumed to be a subset of the test names to run. Usually these are the names of the test scripts (eg. foo.exp). - +.PP Makefile-style variables are used to specify tool names and their flags; these and other configuration dependent values are saved in the file \fBsite.exp\fR, created during configuration. -.SH EXIT CODES -.B runtest -sets the exit code to 1 if any of the tests failed, or -sets it to 0 if all the tests passed. +.SS "Exit status:" +.TP +0 +if all tests passed including expected failures and unsupported tests, +.TP +1 +if any test failed, passed unexpectedly, or was unresolved, +.TP +2 +if Expect encountered any error in the test scripts. .SH AUTHOR Rob Savoye (rob@welcomehome.org) .SH "REPORTING BUGS" diff --git a/lib/framework.exp b/lib/framework.exp index b7e73f4..53a61e2 100644 --- a/lib/framework.exp +++ b/lib/framework.exp @@ -280,7 +280,7 @@ proc unknown args { if {[info exists errorInfo]} { send_error "The info on the error is:\n$errorInfo\n" } - set exit_status 1 + set exit_status 2 log_and_exit } } diff --git a/runtest.exp b/runtest.exp index 59c4591..13ba7e6 100644 --- a/runtest.exp +++ b/runtest.exp @@ -68,8 +68,8 @@ set reboot 0 set configfile site.exp ;# (local to this file) set multipass "" ;# list of passes and var settings set errno ""; ;# -set exit_error 0 ;# Toggle for whether to set the exit status -;# on Tcl bugs in test case drivers. +set exit_error 1 ;# Toggle for whether to set the exit status + ;# on Tcl bugs in test case drivers. # # These describe the host and target environments. # @@ -1155,8 +1155,7 @@ for { set i 0 } { $i < $argc } { incr i } { } "--sta*" { # (--status) exit status flag - set exit_error 1 - verbose "Tcl errors will set an ERROR exit status" + # preserved for compatability, do nothing continue } @@ -1474,9 +1473,9 @@ proc runtest { test_file_name } { # If we have a Tcl error, propagate the exit status so # that 'make' (if it invokes runtest) notices the error. global exit_status exit_error - # exit error is set by a command line option + # exit error is set by the --status command line option if { $exit_status == 0 } { - set exit_status $exit_error + set exit_status 2 } # We can't call `perror' here, it resets `errorInfo' # before we want to look at it. Also remember that perror |