aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.chill
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.chill')
-rw-r--r--gdb/testsuite/gdb.chill/Makefile.in192
-rw-r--r--gdb/testsuite/gdb.chill/callch.exp25
-rw-r--r--gdb/testsuite/gdb.chill/chillvars.exp27
-rw-r--r--gdb/testsuite/gdb.chill/configure.in40
-rw-r--r--gdb/testsuite/gdb.chill/misc.exp26
-rw-r--r--gdb/testsuite/gdb.chill/pr-4975.exp34
-rw-r--r--gdb/testsuite/gdb.chill/pr-5016.exp27
-rw-r--r--gdb/testsuite/gdb.chill/pr-5020.exp27
-rw-r--r--gdb/testsuite/gdb.chill/pr-5022.exp27
-rw-r--r--gdb/testsuite/gdb.chill/pr-5646.exp34
-rw-r--r--gdb/testsuite/gdb.chill/pr-5984.exp27
-rw-r--r--gdb/testsuite/gdb.chill/pr-6292.exp27
-rw-r--r--gdb/testsuite/gdb.chill/pr-6632.exp35
-rw-r--r--gdb/testsuite/gdb.chill/pr-8134.exp36
-rw-r--r--gdb/testsuite/gdb.chill/pr-8136.exp34
-rw-r--r--gdb/testsuite/gdb.chill/result.exp27
-rw-r--r--gdb/testsuite/gdb.chill/string.exp27
-rw-r--r--gdb/testsuite/gdb.chill/tuples.exp27
18 files changed, 252 insertions, 447 deletions
diff --git a/gdb/testsuite/gdb.chill/Makefile.in b/gdb/testsuite/gdb.chill/Makefile.in
index ad2bd92..8270d0f 100644
--- a/gdb/testsuite/gdb.chill/Makefile.in
+++ b/gdb/testsuite/gdb.chill/Makefile.in
@@ -1,191 +1,19 @@
-# Makefile for regression testing Chill support for the GNU debugger.
-# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+srcdir = @srcdir@
-# This file is part of GDB.
+PROGS = callch.exe chillvars.exe misc.exe result.exe string.exe tuples.exe \
+ pr-4975.exe pr-5016.exe pr-5020.exe pr-5022.exe pr-5646.exe \
+ pr-5984.exe pr-6292.exe pr-6632.exe pr-8136.exe
-# GDB is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# GDB is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-srcdir = .
-prefix = /usr/local
-program_transform_name =
-
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
-tooldir = $(libdir)/$(target_alias)
-
-datadir = $(exec_prefix)/lib/dejagnu
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-infodir = $(prefix)/info
-includedir = $(prefix)/include
-gxx_includedir = $(tooldir)/g++-include
-docdir = $(datadir)/doc
-targetdir = $(datadir)/$(target_alias)
-
-SHELL = /bin/sh
-
-INSTALL = install -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
-
-RUNTEST = runtest
-
-RUNTESTFLAGS =
-
-EXPECT = `if [ -f $${rootme}../../../expect/expect ] ; then \
- echo $${rootme}../../../expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST_FOR_TARGET = ` \
- if [ -f $${rootme}../../../dejagnu/site.exp ] ; then \
- echo $${rootme}../../../dejagnu/runtest ; \
- else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo $(RUNTEST); \
- else \
- t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
- fi; \
- fi`
-
-CFLAGS = -g
-CHILLFLAGS = $(CFLAGS)
-
-CHILL_FOR_TARGET = ` \
- if [ -f $${rootme}../../../gcc/Makefile ] ; then \
- echo $${rootme}../../../gcc/xgcc -B$${rootme}../../../gcc/; \
- else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo gcc; \
- else \
- t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
- fi; \
- fi`
-
-CHILL = $(CHILL_FOR_TARGET)
-
-CHILL_LIB = ` \
- if [ -f $${rootme}../../../gcc/ch/runtime/libchill.a ] ; then \
- echo $${rootme}../../../gcc/ch/runtime/chillrt0.o \
- $${rootme}../../../gcc/ch/runtime/libchill.a; \
- else \
- echo -lchill; \
- fi`
+all:
+ @echo "Nothing to be done for all..."
#### host, target, and site specific Makefile frags come in here.
-EXECUTABLES = callch.exe chillvars.exe misc.exe \
- result.exe string.exe tuples.exe \
- pr-4975.exe pr-5016.exe pr-5020.exe pr-5022.exe pr-5646.exe pr-5984.exe \
- pr-6292.exe pr-6632.exe pr-8136.exe
-
-all: $(EXECUTABLES)
-
-# To force pr-4975-grt to be compiled before pr-4975, so the
-# latter can use the former's grant file.
-pr-4975.o: pr-4975-grt.o
-pr-5646.o: pr-5646-grt.o
-pr-6632.o: pr-6632-grt.o
-pr-8136.o: func1.o
-
-.SUFFIXES: .ch .exe .check
-
-pr-6632.exe: pr-6632.o pr-6632-grt.o
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o pr-6632.exe \
- pr-6632.o pr-6632-grt.o $(CHILL_LIB) $(LIBS)
-
-pr-8136.exe: pr-8136.o func1.o
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o pr-8136.exe \
- pr-8136.o func1.o $(CHILL_LIB) $(LIBS)
-
-.o.exe:
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o $*.exe $*.o $(CHILL_LIB) $(LIBS)
-
-.ch.o:
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) -c $<
-
-# Do 'make chillvars.check' to run just the chillvars.{ch,exp} test.
-
-.exe.check:
- rootme=`pwd`/; export rootme; \
- cd .. ; \
- $(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $*.exp" \
- EXPECT=${EXPECT}
-
-.NOEXPORT:
-INFODIRS=doc
-info:
-install-info:
-dvi:
-
-install:
-
-uninstall: force
-
-site.exp: ./config.status Makefile
- @echo "Making a new config file..."
- -@rm -f ./tmp?
- @touch site.exp
- -@mv site.exp site.bak
- @echo "## these variables are automatically generated by make ##" > ./tmp0
- @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
- @echo "# add them to the last section" >> ./tmp0
- @echo "set host_os ${host_os}" >> ./tmp0
- @echo "set host_alias ${host_alias}" >> ./tmp0
- @echo "set host_cpu ${host_cpu}" >> ./tmp0
- @echo "set host_vendor ${host_vendor}" >> ./tmp0
- @echo "set target_os ${target_os}" >> ./tmp0
- @echo "set target_alias ${target_alias}" >> ./tmp0
- @echo "set target_cpu ${target_cpu}" >> ./tmp0
- @echo "set target_vendor ${target_vendor}" >> ./tmp0
- @echo "set host_triplet ${host_canonical}" >> ./tmp0
- @echo "set target_triplet ${target_canonical}" >> ./tmp0
- @echo "set srcdir ${srcdir}" >> ./tmp0
- @echo "set objdir `pwd`" >> ./tmp0
- @echo "set tool gdb" >> ./tmp0
- @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
- @cat ./tmp0 > site.exp
- @cat site.bak | sed \
- -e '1,/^## All variables above are.*##/ d' >> site.exp
- -@rm -f ./tmp?
-
-installcheck:
-check: site.exp all just-check
-just-check:
- tests=`cd ${srcdir}; echo *.exp` ; \
- rootme=`pwd`/; export rootme; \
- cd .. ; \
- $(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $${tests}" \
- EXPECT=${EXPECT}
-
clean mostlyclean:
- -rm -f *~ core *.o a.out xgdb *.x $(EXECUTABLES)
+ -rm -f *.o $OBJS} ${PROGS} *~ core
distclean maintainer-clean realclean: clean
- -rm -f *~ core *.log *.plog *.sum *.psum site.*
- -rm -f Makefile config.status *-init.exp
- -rm -fr *.log summary detail *.plog *.sum *.psum site.*
-
-Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
- $(SHELL) ./config.status
+ -rm -f Makefile config.status
+Makefile: $(srcdir)/Makefile.in $(srcdir)/configure.in
+ $(SHELL) ./config.status --recheck
diff --git a/gdb/testsuite/gdb.chill/callch.exp b/gdb/testsuite/gdb.chill/callch.exp
index 2c5b17e..158fb91 100644
--- a/gdb/testsuite/gdb.chill/callch.exp
+++ b/gdb/testsuite/gdb.chill/callch.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "callch"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -54,17 +64,4 @@ proc do_tests {} {
gdb_test "call whitney(c)" "x.f1\\(FALSE, FALSE\\) = 1.*x.f1\\(FALSE, TRUE\\) = 1.*x.f1\\(TRUE, FALSE\\) = 1.*x.f1\\(TRUE, TRUE\\) = 1.*"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "callch.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/chillvars.exp b/gdb/testsuite/gdb.chill/chillvars.exp
index 2c92d33..72c7ff9 100644
--- a/gdb/testsuite/gdb.chill/chillvars.exp
+++ b/gdb/testsuite/gdb.chill/chillvars.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "chillvars"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -303,17 +313,4 @@ proc test_ptr {} {
gdb_test "print xptr->int" ".* = 32767"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "chillvars.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/configure.in b/gdb/testsuite/gdb.chill/configure.in
index affcf07..ac0d7b7 100644
--- a/gdb/testsuite/gdb.chill/configure.in
+++ b/gdb/testsuite/gdb.chill/configure.in
@@ -1,31 +1,15 @@
-# This file is a shell script fragment that supplies the information
-# necessary to tailor a template configure script into the configure
-# script appropriate for this directory. For more information, check
-# any existing configure script.
+dnl Process this file file with autoconf to produce a configure script.
+dnl This file is a shell script fragment that supplies the information
+dnl necessary to tailor a template configure script into the configure
+dnl script appropriate for this directory. For more information, check
+dnl any existing configure script.
-srctrigger="Makefile.in"
-srcname="gdb.chill"
+AC_PREREQ(1.118)
+AC_INIT(chexp.exp)
-# per-host:
+CC=${CC-cc}
+AC_SUBST(CC)
+AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/../../..)
+AC_CANONICAL_SYSTEM
-# per-target:
-
- # everything defaults to unix for a target
-target_abbrev=unix
-target_makefile_frag=config/mt-unix
-
- # this section is for all targets
-case "${target}" in
- i[345]86-*-aout) target_makefile_frag=../config/mt-i386-aout ;;
- *-*-lynx) target_makefile_frag=../config/mt-lynx ;;
- *-*-netware*) target_makefile_frag=../config/mt-netware ;;
- *-*-vxworks*) target_makefile_frag=../config/mt-vxworks ;;
- m68k-*-*) target_makefile_frag=../config/mt-m68k ;;
- i960-*-nindy) target_makefile_frag=../config/mt-i960-nindy ;;
- a29k-*-udi) target_makefile_frag=../config/mt-a29k-udi ;;
- sparclite-*-*) target_makefile_frag=../config/mt-slite ;;
- sparc-*-aout) target_makefile_frag=../config/mt-sparc-aout ;;
- mips-*-ecoff) target_makefile_frag=../config/mt-mips-ecoff ;;
-esac
-
-# post-target:
+AC_OUTPUT(Makefile)
diff --git a/gdb/testsuite/gdb.chill/misc.exp b/gdb/testsuite/gdb.chill/misc.exp
index 9f3d725..306b061 100644
--- a/gdb/testsuite/gdb.chill/misc.exp
+++ b/gdb/testsuite/gdb.chill/misc.exp
@@ -25,8 +25,15 @@ if $tracelevel then {
strace $tracelevel
}
-set prms_id 0
-set bug_id 0
+if [skip_chill_tests] then { continue }
+
+set testfile "misc"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
# Set the current language to chill. This counts as a test. If it
# fails, then we skip the other tests.
@@ -35,12 +42,8 @@ proc set_lang_chill {} {
global prompt
global binfile objdir subdir
- if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
- return 1
- }
- verbose "loading file '$objdir/$subdir/$binfile'"
- gdb_load $objdir/$subdir/$binfile
+ verbose "loading file '$binfile'"
+ gdb_load $binfile
send "set language chill\n"
expect {
@@ -52,11 +55,10 @@ proc set_lang_chill {} {
"set language to \"chill\""]
}
-# Start with a fresh gdb.
-
-set binfile "misc.exe"
+set prms_id 0
+set bug_id 0
-if [skip_chill_tests] then { continue }
+# Start with a fresh gdb.
gdb_exit
gdb_start
diff --git a/gdb/testsuite/gdb.chill/pr-4975.exp b/gdb/testsuite/gdb.chill/pr-4975.exp
index c7e14db..ad3f83e 100644
--- a/gdb/testsuite/gdb.chill/pr-4975.exp
+++ b/gdb/testsuite/gdb.chill/pr-4975.exp
@@ -23,6 +23,23 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile2 "pr-4975-grt"
+set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+if { [compile "${srcfile2} -g -c"] != "" } {
+ perror "Couldn't compile ${srcfile2}"
+ return -1
+}
+
+set testfile "pr-4975"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +51,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -46,17 +63,4 @@ proc do_tests {} {
gdb_test "finish" "You loose.*" "Runs and reads symbols OK"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-4975.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$objdir/$subdir/$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5016.exp b/gdb/testsuite/gdb.chill/pr-5016.exp
index 9976b0c..381a976 100644
--- a/gdb/testsuite/gdb.chill/pr-5016.exp
+++ b/gdb/testsuite/gdb.chill/pr-5016.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "pr-5016"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -47,17 +57,4 @@ proc do_tests {} {
gdb_test "ptype a" "type = /\\*LOC\\*/ ARRAY \\(1:10\\) (INT|int)"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-5016.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5020.exp b/gdb/testsuite/gdb.chill/pr-5020.exp
index 3f60b23..47a4302 100644
--- a/gdb/testsuite/gdb.chill/pr-5020.exp
+++ b/gdb/testsuite/gdb.chill/pr-5020.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "pr-5020"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -72,17 +82,4 @@ proc test_pr_5020 {} {
]]} "print y pretty"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-5020.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$objdir/$subdir/$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5022.exp b/gdb/testsuite/gdb.chill/pr-5022.exp
index 4d6ca5e..e690343 100644
--- a/gdb/testsuite/gdb.chill/pr-5022.exp
+++ b/gdb/testsuite/gdb.chill/pr-5022.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "pr-5022"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -57,17 +67,4 @@ proc test_pr_5022 {} {
gdb_test "p p" {= PTR\(H'[0-9a-fA-F]+\)} "print non-NULL pointer"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-5022.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5646.exp b/gdb/testsuite/gdb.chill/pr-5646.exp
index fee3b8b..8f57c15 100644
--- a/gdb/testsuite/gdb.chill/pr-5646.exp
+++ b/gdb/testsuite/gdb.chill/pr-5646.exp
@@ -23,6 +23,23 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile2 "pr-5646-grt"
+set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+if { [compile "${srcfile2} -g -c"] != "" } {
+ perror "Couldn't compile ${srcfile2}"
+ return -1
+}
+
+set testfile "pr-5646"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +51,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -43,17 +60,4 @@ proc do_tests {} {
gdb_test_exact "print xx" {= [a:b]}
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-5646.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-5984.exp b/gdb/testsuite/gdb.chill/pr-5984.exp
index 865ee72..450c335 100644
--- a/gdb/testsuite/gdb.chill/pr-5984.exp
+++ b/gdb/testsuite/gdb.chill/pr-5984.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "pr-5984"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ;
@@ -44,17 +54,4 @@ proc do_tests {} {
gdb_test "next" "Jason Dark.*" "next over Jason Dark"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-5984.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-6292.exp b/gdb/testsuite/gdb.chill/pr-6292.exp
index 4d9cd4e..45c66d3 100644
--- a/gdb/testsuite/gdb.chill/pr-6292.exp
+++ b/gdb/testsuite/gdb.chill/pr-6292.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "pr-6292"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ;
@@ -45,17 +55,4 @@ proc do_tests {} {
gdb_test "print i" { = 13} "print i after call"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-6292.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-6632.exp b/gdb/testsuite/gdb.chill/pr-6632.exp
index 4fd00dd..5b2c7f6 100644
--- a/gdb/testsuite/gdb.chill/pr-6632.exp
+++ b/gdb/testsuite/gdb.chill/pr-6632.exp
@@ -23,6 +23,24 @@ if $tracelevel then {
strace $tracelevel
}
+
+if [skip_chill_tests] then { continue }
+
+set testfile2 "pr-6632-grt"
+set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+if { [compile "${srcfile2} -g -c"] != "" } {
+ perror "Couldn't compile ${srcfile2}"
+ return -1
+}
+
+set testfile "pr-6632"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +52,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -44,17 +62,4 @@ proc do_tests {} {
gdb_test "print x" { = dummy_10}
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-6632.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-8134.exp b/gdb/testsuite/gdb.chill/pr-8134.exp
index 086d527..e2586d0 100644
--- a/gdb/testsuite/gdb.chill/pr-8134.exp
+++ b/gdb/testsuite/gdb.chill/pr-8134.exp
@@ -23,6 +23,24 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+# Note we use pr-8136.ch for pr-8134.exp as well as pr-8136.exp.
+set testfile2 "func1"
+set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+if { [compile "${srcfile2} -g -c"] != "" } {
+ perror "Couldn't compile ${srcfile2}"
+ return -1
+}
+
+set testfile "pr-8134"
+set srcfile ${srcdir}/$subdir/pr-8136.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +52,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -43,18 +61,4 @@ proc do_tests {} {
gdb_test "print last" "= 10"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-# Note we use pr-8136 for pr-8134.exp as well as pr-8136.exp.
-set binfile "pr-8136.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/pr-8136.exp b/gdb/testsuite/gdb.chill/pr-8136.exp
index b1bca3f..29f99a9 100644
--- a/gdb/testsuite/gdb.chill/pr-8136.exp
+++ b/gdb/testsuite/gdb.chill/pr-8136.exp
@@ -23,6 +23,23 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile2 "func1"
+set srcfile2 ${srcdir}/$subdir/${testfile2}.ch
+if { [compile "${srcfile2} -g -c"] != "" } {
+ perror "Couldn't compile ${srcfile2}"
+ return -1
+}
+
+set testfile "pr-8136"
+set srcfile ${srcdir}/$subdir/pr-8136.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +51,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -42,17 +59,4 @@ proc do_tests {} {
gdb_test "print ps" {= \[e3, e7:e9\]}
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "pr-8136.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/result.exp b/gdb/testsuite/gdb.chill/result.exp
index a76c953..73cae89 100644
--- a/gdb/testsuite/gdb.chill/result.exp
+++ b/gdb/testsuite/gdb.chill/result.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "result"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -55,17 +65,4 @@ proc do_tests {} {
gdb_test "print i" "= 50"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "result.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$objdir/$subdir/$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/string.exp b/gdb/testsuite/gdb.chill/string.exp
index e7c7b25..436f3bd 100644
--- a/gdb/testsuite/gdb.chill/string.exp
+++ b/gdb/testsuite/gdb.chill/string.exp
@@ -21,6 +21,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "string"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -32,7 +42,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -55,17 +65,4 @@ proc do_tests {} {
gdb_test "p upper(s20)" { = 19} "print varying string upper"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "string.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests
diff --git a/gdb/testsuite/gdb.chill/tuples.exp b/gdb/testsuite/gdb.chill/tuples.exp
index d32423d..c1b9472 100644
--- a/gdb/testsuite/gdb.chill/tuples.exp
+++ b/gdb/testsuite/gdb.chill/tuples.exp
@@ -23,6 +23,16 @@ if $tracelevel then {
strace $tracelevel
}
+if [skip_chill_tests] then { continue }
+
+set testfile "tuples"
+set srcfile ${srcdir}/$subdir/${testfile}.ch
+set binfile ${objdir}/${subdir}/${testfile}.exe
+if { [compile "${srcfile} -g -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
+ perror "Couldn't compile ${srcfile}"
+ return -1
+}
+
proc do_tests {} {
global prms_id bug_id subdir objdir srcdir binfile prompt
@@ -34,7 +44,7 @@ proc do_tests {} {
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_load $objdir/$subdir/$binfile
+ gdb_load $binfile
send "set language chill\n" ; expect -re "$prompt $"
@@ -114,17 +124,4 @@ proc do_tests {} {
"print bitstring after assignment of \[\]"
}
-# Check to see if we have an executable to test. If not, then either we
-# haven't tried to compile one, or the compilation failed for some reason.
-# In either case, just notify the user and skip the tests in this file.
-
-set binfile "tuples.exe"
-set srcfile $binfile.ch
-
-if [skip_chill_tests] then { continue }
-
-if ![file exists $objdir/$subdir/$binfile] then {
- warning "$binfile does not exist; tests suppressed." 0
-} else {
- do_tests
-}
+do_tests