1
# Copyright (C) 1992 - 2002,2003 Free Software Foundation, Inc.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
# Please email any bugs, comments, and/or additions to this file to:
20
# This file was written by Rob Savoye. (rob@welcomehome.org)
22
load_lib util-defs.exp
24
# move the site.exp file so we have no default to confuse us.
25
#if [file exists $objdir/site.exp] {
26
# catch "exec mv -f $objdir/site.exp $objdir/site.ignore"
28
set fd [open site.exp w]
29
puts ${fd} "set host_triplet $host_triplet"
30
puts ${fd} "set srcdir $srcdir/.."
31
puts ${fd} "set objdir $objdir/.."
32
puts ${fd} "set tmpdir $objdir/../tmpdir"
37
# 1st field is the command line option.
38
# 2nd field is the pattern to match.
39
# NOTE - No variable substitutions can be used.
40
# 3rd field is an optional message to print with PASS/FAIL.
45
{ "-v --tool xXx" "Found.*site\..*Loading.*utils\.exp" "Loading library files" }
46
{ "-v --tool xXx" "Expect binary is.*Using.*main test driver" "Loading basic packages" }
47
{ "--F --tool x" "Illegal Argument \"--F\"" "Bad argument" }
48
{ "--tool x" "Couldn't find tool init file" "Bad tool name" }
49
{ "--help" "USAGE:*" "Display help" }
50
{ "-v -v -v" "Verbose level is 3" "Verbose set correctly" }
51
{ "-V" "Expect version is.*Tcl version is.*Framework version is*" "--version" }
52
{ "-v --target m68k-vxworks" "Target is m68k-vxworks" "--target option" }
53
{ "-v --host sparc-sun-sunos4.1.9" "Native configuration is sparc-sun-sunos4.1.9" "--host option" }
54
{ "-v -a" "Print all test output to screen" "--all option" }
55
{ "-v --objdir xXx" "Using test binaries in xXx" "--objdir option" }
56
{ "-v --tool xXx" "Testing xXx" "--tool option" }
57
{ "-v --debug" "Expect Debugging is ON" "--debug option" }
58
{ "-v --D0" "Tcl debugger is ON" "--D0 option" }
61
# Commented out for now--this is failing because of a TCL8 strace interaction.
62
# { "-v --strace 1" "Source Trace level is now 1.* 1 if" "--strace option" }
65
# Old tests not used anymore
66
# { "-v --build sparc-sun-sunos4.1.9" "Native configuration is sparc-sun-sunos4.1.9" "--build option" }
67
# { "-v --srcdir xXx" "Using test sources in xXx" "--srcdir option" }
70
if [util_test "$RUNTEST" "[lindex $i 0] -srcdir ${srcdir}/runtest.all" "" "[lindex $i 1]"] {
78
set fd [open site.exp w]
79
puts ${fd} "set host_triplet $host_triplet"
80
puts ${fd} "set srcdir $srcdir"
81
puts ${fd} "set objdir $objdir"
82
puts ${fd} "set tmpdir $objdir/tmpdir"
85
# clean up log files left by the child runtest
86
if [file exists $objdir/x.sum] {
87
exec rm -f $objdir/x.*
89
if [file exists $objdir/xXx.sum] {
90
exec rm -f $objdir/xXx.*