aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runtest.all/options.exp
diff options
context:
space:
mode:
authorRob Savoye <rob@welcomehome.org>2001-02-05 04:26:49 +0000
committerRob Savoye <rob@welcomehome.org>2001-02-05 04:26:49 +0000
commit8813c6679e78c06d69259993baf8f44537abdc11 (patch)
treecd107e9fab160ca92d55e594e878d0d9bb776cce /testsuite/runtest.all/options.exp
parent65bfb0bc0716fbf4ae5f12992afa403287143039 (diff)
downloaddejagnu-origin/redhat.zip
dejagnu-origin/redhat.tar.gz
dejagnu-origin/redhat.tar.bz2
import from redhat cvsfrom-devoorigin/redhatredhat
Diffstat (limited to 'testsuite/runtest.all/options.exp')
-rw-r--r--testsuite/runtest.all/options.exp93
1 files changed, 93 insertions, 0 deletions
diff --git a/testsuite/runtest.all/options.exp b/testsuite/runtest.all/options.exp
new file mode 100644
index 0000000..0c396ce
--- /dev/null
+++ b/testsuite/runtest.all/options.exp
@@ -0,0 +1,93 @@
+# Copyright (C) 1988, 90-92, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-dejagnu@prep.ai.mit.edu
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+load_lib util-defs.exp
+
+# move the site.exp file so we have no default to confuse us.
+#if [file exists $objdir/site.exp] {
+# catch "exec mv -f $objdir/site.exp $objdir/site.ignore"
+#}
+set fd [open site.exp w]
+puts ${fd} "set host_triplet $host_triplet"
+puts ${fd} "set srcdir $srcdir/.."
+puts ${fd} "set objdir $objdir/.."
+puts ${fd} "set tmpdir $objdir/../tmpdir"
+close $fd
+
+#
+# Set up the list.
+# 1st field is the command line option.
+# 2nd field is the pattern to match.
+# NOTE - No variable substitutions can be used.
+# 3rd field is an optional message to print with PASS/FAIL.
+#
+
+
+set tests {
+ { "" "WARNING: No tool specified" "No arguments" }
+ { "-v --tool xXx" "Found.*site\..*Loading.*utils\.exp" "Loading library files" }
+ { "-v --tool xXx" "Expect binary is.*Using.*main test driver" "Loading basic packages" }
+ { "--F --tool x" "Illegal Argument \"--F\"" "Bad argument" }
+ { "--tool x" "Couldn't find tool init file" "Bad tool name" }
+ { "--help" "USAGE:*" "Display help" }
+ { "-v -v -v" "Verbose level is 3" "Verbose set correctly" }
+ { "-V" "Expect version is.*Tcl version is.*Framework version is*" "--version" }
+ { "-v --target m68k-vxworks" "Target is m68k-vxworks" "--target option" }
+ { "-v --host sparc-sun-sunos4.1.9" "Native configuration is sparc-sun-sunos4.1.9" "--host option" }
+ { "-v -a" "Print all test output to screen" "--all option" }
+ { "-v --objdir xXx" "Using test binaries in xXx" "--objdir option" }
+ { "-v --tool xXx" "Testing xXx" "--tool option" }
+ { "-v --debug" "Expect Debugging is ON" "--debug option" }
+ { "-v --D0" "Tcl debugger is ON" "--D0 option" }
+}
+
+# Commented out for now--this is failing because of a TCL8 strace interaction.
+# { "-v --strace 1" "Source Trace level is now 1.* 1 if" "--strace option" }
+
+
+# Old tests not used anymore
+# { "-v --build sparc-sun-sunos4.1.9" "Native configuration is sparc-sun-sunos4.1.9" "--build option" }
+# { "-v --srcdir xXx" "Using test sources in xXx" "--srcdir option" }
+
+foreach i $tests {
+ if [util_test "$RUNTEST" "[lindex $i 0] -srcdir ${srcdir}/runtest.all" "" "[lindex $i 1]"] {
+ fail "[lindex $i 2]"
+ } else {
+ pass "[lindex $i 2]"
+ }
+}
+
+
+set fd [open site.exp w]
+puts ${fd} "set host_triplet $host_triplet"
+puts ${fd} "set tool runtest"
+puts ${fd} "set srcdir $srcdir"
+puts ${fd} "set objdir $objdir"
+puts ${fd} "set tmpdir $objdir/tmpdir"
+close $fd
+
+# clean up log files left by the child runtest
+if [file exists $objdir/x.sum] {
+ exec rm -f $objdir/x.*
+}
+if [file exists $objdir/xXx.sum] {
+ exec rm -f $objdir/xXx.*
+}