aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in2
-rw-r--r--NEWS40
-rwxr-xr-xruntest.exp19
-rw-r--r--testsuite/Makefile.am6
-rw-r--r--testsuite/Makefile.in3
-rw-r--r--testsuite/libdejagnu/Makefile.am3
-rw-r--r--testsuite/libdejagnu/Makefile.in4
-rw-r--r--testsuite/libdejagnu/tunit.exp8
10 files changed, 75 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 319f1d9..7afa648 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,16 @@
+2001-05-09 Rob Savoye <rob@peggyo.welcomehome.org>
+
+ * runtest.exp: Add new command line option, --status (or -st) to
+ toggle whether Tcl script bugs in test drivers should be
+ propogated as an error to the shell.
+
2001-05-08 Rob Savoye <rob@peggyo.welcomehome.org>
* lib/dejagnu.exp: Trim off test state part of the message, so we
don't duplicate it.
+ * runtest.exp: Set the exit status when their are Tcl script bugs,
+ so make notices the errors. (contributed by Martin Muenstermann
+ <muenstermann@trustcenter.de>)
2001-05-06 Rob Savoye <rob@blackpeter.welcomehome.org>
diff --git a/Makefile.am b/Makefile.am
index 099d4d8..b49d6c8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@ TLCSH = @TCLSH@
RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST)
RUNTEST = ` \
if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then \
- echo ${srcdir}/runtest$(EXEEXT) ; \
+ echo ${srcdir}/runtest$(EXEEXT); \
else echo "ERROR: runtest not found" ; exit 1; fi`
CLEANFILES = x.log x.sum site.bak setval.tmp
diff --git a/Makefile.in b/Makefile.in
index aef5058..9cb5adc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -88,7 +88,7 @@ libexec_SCRIPTS = config.guess
TLCSH = @TCLSH@
RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)/testsuite RUNTEST=$(RUNTEST)
-RUNTEST = ` if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then echo ${srcdir}/runtest$(EXEEXT) ; else echo "ERROR: runtest not found" ; exit 1; fi`
+RUNTEST = ` if [ -f ${srcdir}/runtest$(EXEEXT) ] ; then echo ${srcdir}/runtest$(EXEEXT); else echo "ERROR: runtest not found" ; exit 1; fi`
CLEANFILES = x.log x.sum site.bak setval.tmp
diff --git a/NEWS b/NEWS
index b3caa6c..167b441 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,37 @@
-DejaGnu is now back under active maintainance. The initial work has been
-rewriting the manual to bring it up to date, and switching to SGML. NT
-support has also been added, and DejaGnu now uses automake.
+ Changes from 1.4.0
+ 1. There is new support for a simple unit testing API, that is
+ also useful for embedded testing.
+
+ Changes from 1.3
+
+ 1. DejaGnu is now back under active maintainance. The initial
+ work has been rewriting the manual to bring it up to date, and
+ switching to SGML. NT support has also been added, and DejaGnu
+ now uses automake.
+
+
+ Changes from 1.1.1
+ 1. Works with (included in release) Tcl 7.3 and Expect 5.6.
+ 2. Much better error trapping and handling, including the
+ execution of sub scripts.
+ 3. Re-worked configuration subsystem.
+ 4. Default handling for testing unknown targets.
+ 5. New testsuite for expect and runtest.
+ 6. More debugging procedures.
+
+ Changes from 1.0
+
+ 1. DejaGnu now conforms to POSIX 1003.3, a standard for
+ testing frameworks.
+ 2. A Tcl debugger written by Don Libes has been added.
+ 3. Lots of bug fixes.
+
+ Changes from 0.9
+
+ 1. DejaGnu now installs itself like other utilities.
+ 2. 700 G++ tests are included.
+ 3. The bugs in the GCC tests have been fixed.
+ 4. Testsuites are released separately.
+ 5. Testsuite sources now reside with the within each tool's
+ source tree.
+
diff --git a/runtest.exp b/runtest.exp
index 68a2117..971b834 100755
--- a/runtest.exp
+++ b/runtest.exp
@@ -20,7 +20,7 @@
# This file was written by Rob Savoye. (rob@welcomehome.org)
-set frame_version 1.4.0
+set frame_version 1.4.1.x
if ![info exists argv0] {
send_error "Must use a version of Expect greater than 5.0\n"
exit 1
@@ -64,6 +64,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.
#
# These describe the host and target environments.
#
@@ -370,6 +372,7 @@ proc usage { } {
send_user "\t--host \[string\]\t\tThe canonical config name of the host machine\n"
send_user "\t--host_board \[name\]\tThe host board to use\n"
send_user "\t--target \[string\]\tThe canonical config name of the target board\n"
+ send_user "\t--status (-st)\t\tSet the exit status to fail on Tcl errors\n"
send_user "\t--debug (-de)\t\tSet expect debugging ON\n"
send_user "\t--help (-he)\t\tPrint help text\n"
send_user "\t--mail \[name(s)\]\tWhom to mail the results to\n"
@@ -466,6 +469,11 @@ for { set i 0 } { $i < $argc } { incr i } {
continue
}
+ "--st*" {
+ set exit_error 1
+ continue
+ }
+
"--sr*" { # (--srcdir) where the testsuite source code lives
set srcdir $optarg
continue
@@ -575,7 +583,7 @@ proc load_lib { file } {
set loaded_libs($file) "";
- if { [search_and_load_file "library file" $file [list $libdir $libdir/lib [file dirname [file dirname $srcdir]]/dejagnu/lib $srcdir/lib . [file dirname [file dirname [file dirname $srcdir]]]/dejagnu/lib]] == 0 } {
+ if { [search_and_load_file "library file" $file [list ../lib $libdir $libdir/lib [file dirname [file dirname $srcdir]]/dejagnu/lib $srcdir/lib $execpath/lib . [file dirname [file dirname [file dirname $srcdir]]]/dejagnu/lib]] == 0 } {
send_error "ERROR: Couldn't find library file $file.\n"
exit 1
}
@@ -661,7 +669,7 @@ unset arg_host_triplet arg_build_triplet
if [expr { $build_triplet == "" && $host_triplet == ""} ] {
# find config.guess
- foreach dir "$libdir $libdir/libexec $libdir/.. $srcdir/.. $srcdir/../.." {
+ foreach dir "$libdir $libdir/libexec $libdir/.. $execpath $srcdir $srcdir/.. $srcdir/../.." {
verbose "Looking for ${dir}/config.guess" 2
if [file exists ${dir}/config.guess] {
set config_guess ${dir}/config.guess
@@ -1430,6 +1438,11 @@ proc runtest { test_file_name } {
}
if { [catch "uplevel #0 source $test_file_name"] == 1 } {
+ # If we have a Tcl error, propogate the exit status do make
+ # notices the error.
+ global exit_status exit_error
+ # exit error is set by a command line option
+ set exit_status $exit_error
# We can't call `perror' here, it resets `errorInfo'
# before we want to look at it. Also remember that perror
# increments `errcnt'. If we do call perror we'd have to
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index bbe2dbc..c206058 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -7,7 +7,7 @@ all: site.exp
RUNTEST = ` \
if [ -f ${top_srcdir}/runtest$(EXEEXT) ] ; then \
- echo ${top_srcdir}/runtest$(EXEEXT) ; \
+ echo ${top_srcdir}/runtest$(EXEEXT); \
else echo "ERROR: runtest not found" ; exit 1; fi`
RUNTESTDEFAULTFLAGS = --srcdir $$srcdir
@@ -21,7 +21,6 @@ site.exp: Makefile
@echo '## these variables are automatically generated by make ##' > $@-t
@echo '# Do not edit here. If you wish to override these values' >> $-t
@echo '# edit the last section' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
@echo 'set objdir' `pwd` >> $@-t
@echo 'set tmpdir tmpdir' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
@@ -29,3 +28,6 @@ site.exp: Makefile
@test ! -f site.exp || mv site.exp site.bak
@mv $@-t site.exp
+
+
+
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
index 0bb6749..6d5bee3 100644
--- a/testsuite/Makefile.in
+++ b/testsuite/Makefile.in
@@ -72,7 +72,7 @@ tclsh = @tclsh@
AUTOMAKE_OPTIONS = dejagnu
-RUNTEST = ` if [ -f ${top_srcdir}/runtest$(EXEEXT) ] ; then echo ${top_srcdir}/runtest$(EXEEXT) ; else echo "ERROR: runtest not found" ; exit 1; fi`
+RUNTEST = ` if [ -f ${top_srcdir}/runtest$(EXEEXT) ] ; then echo ${top_srcdir}/runtest$(EXEEXT); else echo "ERROR: runtest not found" ; exit 1; fi`
RUNTESTDEFAULTFLAGS = --srcdir $$srcdir
@@ -311,7 +311,6 @@ site.exp: Makefile
@echo '## these variables are automatically generated by make ##' > $@-t
@echo '# Do not edit here. If you wish to override these values' >> $-t
@echo '# edit the last section' >> $@-t
- @echo 'set srcdir $(srcdir)' >> $@-t
@echo 'set objdir' `pwd` >> $@-t
@echo 'set tmpdir tmpdir' >> $@-t
@echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t
diff --git a/testsuite/libdejagnu/Makefile.am b/testsuite/libdejagnu/Makefile.am
index 6e926d1..2cba0bb 100644
--- a/testsuite/libdejagnu/Makefile.am
+++ b/testsuite/libdejagnu/Makefile.am
@@ -2,7 +2,8 @@
# AUTOMAKE_OPTIONS =
-CFLAGS = -I$(top_srcdir)
+CFLAGS = -I$(top_srcdir) -g
+CXXFLAGS = -I$(top_srcdir) -g
noinst_PROGRAMS = unit
diff --git a/testsuite/libdejagnu/Makefile.in b/testsuite/libdejagnu/Makefile.in
index 5ca370d..4313a7e 100644
--- a/testsuite/libdejagnu/Makefile.in
+++ b/testsuite/libdejagnu/Makefile.in
@@ -72,7 +72,8 @@ TCLSH = @TCLSH@
VERSION = @VERSION@
tclsh = @tclsh@
-CFLAGS = -I$(top_srcdir)
+CFLAGS = -I$(top_srcdir) -g
+CXXFLAGS = -I$(top_srcdir) -g
noinst_PROGRAMS = unit
@@ -91,7 +92,6 @@ unit_OBJECTS = unit.o
unit_LDADD = $(LDADD)
unit_DEPENDENCIES =
unit_LDFLAGS =
-CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
diff --git a/testsuite/libdejagnu/tunit.exp b/testsuite/libdejagnu/tunit.exp
index 39841c5..40e2797 100644
--- a/testsuite/libdejagnu/tunit.exp
+++ b/testsuite/libdejagnu/tunit.exp
@@ -1,11 +1,7 @@
load_lib "dejagnu.exp"
-# If tracing has been enabled at the top level, then turn it on here
-# too.
-if $tracelevel {
- strace $tracelevel
-}
-
+# Uncomment these for debugging help
+#strace $tracelevel
# exp_internal -f dbg.log 1
# Execute everything in the test subdir so all the output files go there.