~ubuntu-branches/ubuntu/saucy/dejagnu/saucy

« back to all changes in this revision

Viewing changes to testsuite/runtest.all/options.exp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2004-02-09 15:07:58 UTC
  • Revision ID: james.westby@ubuntu.com-20040209150758-oaj7r5zrop60v8sb
Tags: upstream-1.4.4
ImportĀ upstreamĀ versionĀ 1.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#   Copyright (C) 1992 - 2002,2003 Free Software Foundation, Inc.
 
2
 
 
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.
 
7
#
 
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.
 
12
#
 
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.
 
16
 
 
17
# Please email any bugs, comments, and/or additions to this file to:
 
18
# bug-dejagnu@gnu.org
 
19
 
 
20
# This file was written by Rob Savoye. (rob@welcomehome.org)
 
21
 
 
22
load_lib util-defs.exp
 
23
 
 
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"
 
27
#}
 
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"
 
33
close $fd
 
34
 
 
35
#
 
36
# Set up the list.
 
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.
 
41
#
 
42
 
 
43
 
 
44
set tests {
 
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" }
 
59
}
 
60
 
 
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" }
 
63
 
 
64
 
 
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" }
 
68
 
 
69
foreach i $tests {
 
70
    if [util_test "$RUNTEST" "[lindex $i 0] -srcdir ${srcdir}/runtest.all" "" "[lindex $i 1]"] {
 
71
        fail "[lindex $i 2]"
 
72
    } else {
 
73
        pass "[lindex $i 2]"
 
74
    }
 
75
}
 
76
 
 
77
 
 
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"
 
83
close $fd
 
84
 
 
85
# clean up log files left by the child runtest
 
86
if [file exists $objdir/x.sum] {
 
87
    exec rm -f $objdir/x.*
 
88
}
 
89
if [file exists $objdir/xXx.sum] {
 
90
    exec rm -f $objdir/xXx.*
 
91
}