1 # Copyright 1999, 2001 Red Hat, Inc.
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License (GPL) as published by
5 # the Free Software Foundation; either version 2 of the License, or (at
6 # 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 load_lib ../gdb.gdbtk/insight-support.exp
15 if {[gdbtk_initialize_display]} {
27 set s1 "$srcdir/$subdir/list0.c"
28 set sources "$s1 $srcdir/$subdir/list1.c"
29 set binfile $objdir/$subdir/$testfile
30 if {[file exists $s1.save]} {
31 catch {file delete $s1}
32 file rename $s1.save $s1
34 set r [gdb_compile $sources "$binfile" executable debug]
36 gdb_suppress_entire_file \
37 "Testcase compile failed, so some tests in this file will automatically fail."
40 # Start with a fresh gdbtk
42 set results [gdbtk_start [file join $srcdir $subdir srcwin.test]]
43 set results [split $results \n]
44 set all_results $results
46 # move file with "main" out of the way
47 file rename $s1 $s1.save
49 # run slightly different set of tests
51 set results [gdbtk_start [file join $srcdir $subdir srcwin2.test]]
52 set results [split $results \n]
53 set all_results [concat $all_results $results]
56 file rename $s1.save $s1
58 set r [gdb_compile $sources "$binfile" executable ""]
60 gdb_suppress_entire_file \
61 "Testcase compile failed, so some tests in this file will automatically fail."
63 # run slightly different set of tests
65 set results [gdbtk_start [file join $srcdir $subdir srcwin3.test]]
66 set results [split $results \n]
67 set all_results [concat $all_results $results]
70 gdbtk_done $all_results