Browse Source

* 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.
dejagnu-1.6
Ben Elliston 10 years ago
parent
commit
20e8dfb5d2
  1. 9
      ChangeLog
  2. 11
      NEWS
  3. 16
      doc/runtest.1
  4. 2
      lib/framework.exp
  5. 11
      runtest.exp

9
ChangeLog

@ -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

11
NEWS

@ -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:

16
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"

2
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
}
}

11
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

Loading…
Cancel
Save