Add support to skip import libraries for performance reasons and instead
[binutils-gdb.git] / gdb / testsuite / gdb.chill / powerset.exp
1 # OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
2 # OBSOLETE
3 # OBSOLETE # This program is free software; you can redistribute it and/or modify
4 # OBSOLETE # it under the terms of the GNU General Public License as published by
5 # OBSOLETE # the Free Software Foundation; either version 2 of the License, or
6 # OBSOLETE # (at your option) any later version.
7 # OBSOLETE #
8 # OBSOLETE # This program is distributed in the hope that it will be useful,
9 # OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # OBSOLETE # GNU General Public License for more details.
12 # OBSOLETE #
13 # OBSOLETE # You should have received a copy of the GNU General Public License
14 # OBSOLETE # along with this program; if not, write to the Free Software
15 # OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 # OBSOLETE
17 # OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
18 # OBSOLETE # bug-gdb@prep.ai.mit.edu
19 # OBSOLETE
20 # OBSOLETE # This file tests various Chill values, expressions, and types.
21 # OBSOLETE
22 # OBSOLETE if $tracelevel then {
23 # OBSOLETE strace $tracelevel
24 # OBSOLETE }
25 # OBSOLETE
26 # OBSOLETE if [skip_chill_tests] then { continue }
27 # OBSOLETE
28 # OBSOLETE set testfile "powerset"
29 # OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
30 # OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
31 # OBSOLETE if { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
32 # OBSOLETE perror "Couldn't compile ${srcfile}"
33 # OBSOLETE return -1
34 # OBSOLETE }
35 # OBSOLETE
36 # OBSOLETE # Set the current language to chill. This counts as a test. If it
37 # OBSOLETE # fails, then we skip the other tests.
38 # OBSOLETE
39 # OBSOLETE proc set_lang_chill {} {
40 # OBSOLETE global gdb_prompt
41 # OBSOLETE global binfile objdir subdir
42 # OBSOLETE
43 # OBSOLETE verbose "loading file '$binfile'"
44 # OBSOLETE gdb_load $binfile
45 # OBSOLETE send_gdb "set language chill\n"
46 # OBSOLETE gdb_expect {
47 # OBSOLETE -re ".*$gdb_prompt $" {}
48 # OBSOLETE timeout { fail "set language chill (timeout)" ; return 0 }
49 # OBSOLETE }
50 # OBSOLETE
51 # OBSOLETE send_gdb "show language\n"
52 # OBSOLETE gdb_expect {
53 # OBSOLETE -re ".* source language is \"chill\".*$gdb_prompt $" {
54 # OBSOLETE pass "set language to \"chill\""
55 # OBSOLETE send_gdb "break xx_\n"
56 # OBSOLETE gdb_expect {
57 # OBSOLETE -re ".*$gdb_prompt $" {
58 # OBSOLETE send_gdb "run\n"
59 # OBSOLETE gdb_expect -re ".*$gdb_prompt $" {}
60 # OBSOLETE return 1
61 # OBSOLETE }
62 # OBSOLETE timeout {
63 # OBSOLETE fail "can't set breakpoint (timeout)"
64 # OBSOLETE return 0
65 # OBSOLETE }
66 # OBSOLETE }
67 # OBSOLETE }
68 # OBSOLETE -re ".*$gdb_prompt $" {
69 # OBSOLETE fail "setting language to \"chill\""
70 # OBSOLETE return 0
71 # OBSOLETE }
72 # OBSOLETE timeout {
73 # OBSOLETE fail "can't show language (timeout)"
74 # OBSOLETE return 0
75 # OBSOLETE }
76 # OBSOLETE }
77 # OBSOLETE }
78 # OBSOLETE
79 # OBSOLETE # Testing printing of a specific value. Increment passcount for
80 # OBSOLETE # success or issue fail message for failure. In both cases, return
81 # OBSOLETE # a 1 to indicate that more tests can proceed. However a timeout
82 # OBSOLETE # is a serious error, generates a special fail message, and causes
83 # OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
84 # OBSOLETE # as well.
85 # OBSOLETE #
86 # OBSOLETE # Args are:
87 # OBSOLETE #
88 # OBSOLETE # First one is string to send_gdb to gdb
89 # OBSOLETE # Second one is string to match gdb result to
90 # OBSOLETE # Third one is an optional message to be printed
91 # OBSOLETE
92 # OBSOLETE proc test_print_accept { args } {
93 # OBSOLETE global gdb_prompt
94 # OBSOLETE global passcount
95 # OBSOLETE global verbose
96 # OBSOLETE
97 # OBSOLETE if [llength $args]==3 then {
98 # OBSOLETE set message [lindex $args 2]
99 # OBSOLETE } else {
100 # OBSOLETE set message [lindex $args 0]
101 # OBSOLETE }
102 # OBSOLETE set sendthis [lindex $args 0]
103 # OBSOLETE set expectthis [lindex $args 1]
104 # OBSOLETE set result [gdb_test $sendthis ".* = ${expectthis}" $message]
105 # OBSOLETE if $result==0 {incr passcount}
106 # OBSOLETE return $result
107 # OBSOLETE }
108 # OBSOLETE
109 # OBSOLETE proc test_card {} {
110 # OBSOLETE global passcount
111 # OBSOLETE
112 # OBSOLETE verbose "testing builtin CARD"
113 # OBSOLETE set passcount 0
114 # OBSOLETE
115 # OBSOLETE # discrete mode names
116 # OBSOLETE test_print_accept "print card(v_ps1)" "4"
117 # OBSOLETE test_print_accept "print card(v_ps2)" "15"
118 # OBSOLETE test_print_accept "print card(v_ps3)" "4"
119 # OBSOLETE test_print_accept "print card(v_ps4)" "11"
120 # OBSOLETE test_print_accept "print card(v_ps5)" "1"
121 # OBSOLETE test_print_accept "print card(v_ps51)" "0"
122 # OBSOLETE test_print_accept "print card(v_ps6)" "101"
123 # OBSOLETE
124 # OBSOLETE # a failure
125 # OBSOLETE setup_xfail "*-*-*"
126 # OBSOLETE test_print_accept "print card(m_ps1)" "typename in invalid context"
127 # OBSOLETE }
128 # OBSOLETE
129 # OBSOLETE proc test_min {} {
130 # OBSOLETE global passcount
131 # OBSOLETE
132 # OBSOLETE verbose "testing builtin MIN"
133 # OBSOLETE set passcount 0
134 # OBSOLETE
135 # OBSOLETE # discrete mode names
136 # OBSOLETE test_print_accept "print min(v_ps1)" "1"
137 # OBSOLETE test_print_accept "print min(v_ps2)" "-100"
138 # OBSOLETE test_print_accept "print min(v_ps3)" "bb"
139 # OBSOLETE test_print_accept "print min(v_ps4)" "','"
140 # OBSOLETE test_print_accept "print min(v_ps5)" "FALSE"
141 # OBSOLETE test_print_accept "print min(v_ps6)" "-50"
142 # OBSOLETE
143 # OBSOLETE # a failure
144 # OBSOLETE setup_xfail "*-*-*"
145 # OBSOLETE test_print_accept "print min(v_ps51)" "MIN for empty powerset"
146 # OBSOLETE setup_xfail "*-*-*"
147 # OBSOLETE test_print_accept "print min(m_ps1)" "typename in invalid context"
148 # OBSOLETE }
149 # OBSOLETE
150 # OBSOLETE proc test_max {} {
151 # OBSOLETE global passcount
152 # OBSOLETE
153 # OBSOLETE verbose "testing builtin MIN"
154 # OBSOLETE set passcount 0
155 # OBSOLETE
156 # OBSOLETE # discrete mode names
157 # OBSOLETE test_print_accept "print max(v_ps1)" "7"
158 # OBSOLETE test_print_accept "print max(v_ps2)" "100"
159 # OBSOLETE test_print_accept "print max(v_ps3)" "ii"
160 # OBSOLETE test_print_accept "print max(v_ps4)" "'z'"
161 # OBSOLETE test_print_accept "print max(v_ps5)" "FALSE"
162 # OBSOLETE test_print_accept "print max(v_ps6)" "50"
163 # OBSOLETE
164 # OBSOLETE # test an IN
165 # OBSOLETE test_print_accept "print 0 in v_ps6" "TRUE"
166 # OBSOLETE
167 # OBSOLETE # a failure
168 # OBSOLETE setup_xfail "*-*-*"
169 # OBSOLETE test_print_accept "print max(v_ps51)" "MAX for empty powerset"
170 # OBSOLETE }
171 # OBSOLETE
172 # OBSOLETE # Start with a fresh gdb.
173 # OBSOLETE
174 # OBSOLETE gdb_exit
175 # OBSOLETE gdb_start
176 # OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
177 # OBSOLETE
178 # OBSOLETE gdb_test "set print sevenbit-strings" ".*"
179 # OBSOLETE
180 # OBSOLETE if [set_lang_chill] then {
181 # OBSOLETE # test builtins as described in chapter 6.20.3 Z.200
182 # OBSOLETE test_card
183 # OBSOLETE test_min
184 # OBSOLETE test_max
185 # OBSOLETE } else {
186 # OBSOLETE warning "$test_name tests suppressed."
187 # OBSOLETE }