OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [dejagnu/] [testsuite/] [runtest.all/] [options.exp] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#   Copyright (C) 1988, 90-92, 1994, 1995, 1996, 1997 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@prep.ai.mit.edu
19
 
20
# This file was written by Rob Savoye. (rob@cygnus.com)
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
    { "" "WARNING: No tool specified" "No arguments" }
46
    { "-v --tool xXx" "Found.*site\..*Loading.*utils\.exp" "Loading library files" }
47
    { "-v --tool xXx" "Expect binary is.*Using.*main test driver" "Loading basic packages" }
48
    { "--F --tool x" "Illegal Argument \"--F\"" "Bad argument" }
49
    { "--tool x" "Couldn't find tool init file" "Bad tool name" }
50
    { "--help" "USAGE:*" "Display help" }
51
    { "-v -v -v" "Verbose level is 3" "Verbose set correctly" }
52
    { "-V" "Expect version is.*Tcl version is.*Framework version is*" "--version" }
53
    { "-v --target m68k-vxworks" "Target is m68k-vxworks" "--target option" }
54
    { "-v --host sparc-sun-sunos4.1.9" "Native configuration is sparc-sun-sunos4.1.9" "--host option" }
55
    { "-v -a" "Print all test output to screen" "--all option" }
56
    { "-v --objdir xXx" "Using test binaries in xXx" "--objdir option" }
57
    { "-v --tool xXx" "Testing xXx" "--tool option" }
58
    { "-v --debug" "Expect Debugging is ON" "--debug option" }
59
    { "-v --D0" "Tcl debugger is ON" "--D0 option" }
60
}
61
 
62
# Commented out for now--this is failing because of a TCL8 strace interaction.
63
#    { "-v --strace 1" "Source Trace level is now 1.* 1  if" "--strace option" }
64
 
65
 
66
# Old tests not used anymore
67
#    { "-v --build sparc-sun-sunos4.1.9" "Native configuration is sparc-sun-sunos4.1.9" "--build option" }
68
#    { "-v --srcdir xXx" "Using test sources in xXx" "--srcdir option" }
69
 
70
foreach i $tests {
71
    if [util_test "$RUNTEST" "[lindex $i 0] -srcdir ${srcdir}/runtest.all" "" "[lindex $i 1]"] {
72
        fail "[lindex $i 2]"
73
    } else {
74
        pass "[lindex $i 2]"
75
    }
76
}
77
 
78
 
79
set fd [open site.exp w]
80
puts ${fd} "set host_triplet $host_triplet"
81
puts ${fd} "set tool runtest"
82
puts ${fd} "set srcdir $srcdir"
83
puts ${fd} "set objdir $objdir"
84
puts ${fd} "set tmpdir $objdir/tmpdir"
85
close $fd
86
 
87
# clean up log files left by the child runtest
88
if [file exists $objdir/x.sum] {
89
    exec rm -f $objdir/x.*
90
}
91
if [file exists $objdir/xXx.sum] {
92
    exec rm -f $objdir/xXx.*
93
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.