aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1994-06-09 23:13:54 +0000
committerPer Bothner <per@bothner.com>1994-06-09 23:13:54 +0000
commit605f94ba350cd1a2a72ab918105a0e7a0859eaae (patch)
treef1f560fad11936c1a2300ca97543074bb2b8c099
parentf2f803c158267f01f4c30e80abe52585e8e926f1 (diff)
downloadgdb-605f94ba350cd1a2a72ab918105a0e7a0859eaae.zip
gdb-605f94ba350cd1a2a72ab918105a0e7a0859eaae.tar.gz
gdb-605f94ba350cd1a2a72ab918105a0e7a0859eaae.tar.bz2
* Makefile.in: Bunch of fixes so it actually works in this
directory. (E.g. add extra ../ where needed.) Also, add .exe to executables, so we can use suffix rules. * chexp.exp (test_print_reject): Update syntax error message. * chillvars.ch (module PR_5020): Moved from here ... * pr-5022.ch: ... to this new file. * chillvars.exp, pr-5020.exp (binfile): Add .exe extension. * chillvars.exp, pr-5020.exp: Don't check all_flag. * pr-5020.exp: Add more tests; fix "print y pretty" output.
-rw-r--r--gdb/testsuite/gdb.chill/.Sanitize2
-rw-r--r--gdb/testsuite/gdb.chill/Makefile.in47
-rw-r--r--gdb/testsuite/gdb.chill/chexp.exp2
-rw-r--r--gdb/testsuite/gdb.chill/chillvars.ch14
-rw-r--r--gdb/testsuite/gdb.chill/chillvars.exp6
-rw-r--r--gdb/testsuite/gdb.chill/pr-5020.ch19
-rw-r--r--gdb/testsuite/gdb.chill/pr-5020.exp28
7 files changed, 63 insertions, 55 deletions
diff --git a/gdb/testsuite/gdb.chill/.Sanitize b/gdb/testsuite/gdb.chill/.Sanitize
index 373d893..68fae62 100644
--- a/gdb/testsuite/gdb.chill/.Sanitize
+++ b/gdb/testsuite/gdb.chill/.Sanitize
@@ -28,6 +28,8 @@ chexp.exp
chillvars.ch
chillvars.exp
configure.in
+pr-5020.ch
+pr-5020.exp
Things-to-lose:
diff --git a/gdb/testsuite/gdb.chill/Makefile.in b/gdb/testsuite/gdb.chill/Makefile.in
index 111b3a9..da50374 100644
--- a/gdb/testsuite/gdb.chill/Makefile.in
+++ b/gdb/testsuite/gdb.chill/Makefile.in
@@ -53,13 +53,13 @@ RUNTEST = runtest
RUNTESTFLAGS =
-EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
- echo $${rootme}/../../expect/expect ; \
+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 ; \
+ if [ -f $${rootme}../../../dejagnu/site.exp ] ; then \
+ echo $${rootme}../../../dejagnu/runtest ; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(RUNTEST); \
@@ -68,11 +68,12 @@ RUNTEST_FOR_TARGET = ` \
fi; \
fi`
+CFLAGS = -g
CHILLFLAGS = $(CFLAGS)
CHILL_FOR_TARGET = ` \
- if [ -f $${rootme}/../../gcc/Makefile ] ; then \
- echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/; \
+ if [ -f $${rootme}../../../gcc/Makefile ] ; then \
+ echo $${rootme}../../../gcc/xgcc -B$${rootme}../../../gcc/; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo gcc; \
@@ -84,16 +85,16 @@ CHILL_FOR_TARGET = ` \
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; \
+ 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`
GDB = ` \
- if [ -f $${rootme}/../gdb ] ; \
- then echo $${rootme}|sed -e 's@/[^/]*$$@@'|sed -e 's@$$@/gdb@' ; \
+ if [ -f $${rootme}../../gdb ] ; \
+ then echo $${rootme}../../gdb; \
else echo gdb; \
fi`
@@ -101,15 +102,17 @@ GDBFLAGS = -nx
#### host, target, and site specific Makefile frags come in here.
-EXECUTABLES = chillvars
+EXECUTABLES = chillvars.exe pr-5020.exe pr-5022.exe
all: $(EXECUTABLES)
-chillvars: chillvars.o
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o chillvars chillvars.o $(CHILL_LIB) $(LIBS)
+.SUFFIXES: .ch .exe
-chillvars.o: chillvars.ch
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) -fspecial_UC -c $(srcdir)/chillvars.ch
+.o.exe:
+ $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o $*.exe $*.o $(CHILL_LIB) $(LIBS)
+
+.ch.o:
+ $(CHILL_FOR_TARGET) $(CHILLFLAGS) -fspecial_UC -c $<
.NOEXPORT:
INFODIRS=doc
@@ -152,13 +155,11 @@ site.exp: ./config.status Makefile
installcheck:
check: site.exp all just-check
just-check:
- rootme=`pwd`; export rootme; \
- srcdir=${srcdir} ; export srcdir ; \
- EXPECT=${EXPECT} ; export EXPECT ; \
- if [ -f $${rootme}/../../expect/expect ] ; then \
- TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
- export TCL_LIBRARY ; fi ; \
- $(RUNTEST_FOR_TARGET) $(RUNTESTFLAGS) --tool gdb GDB=$(GDB) --srcdir $(srcdir)
+ tests=`cd ${srcdir}; echo *.exp` ; \
+ rootme=`pwd`/; export rootme; \
+ cd .. ; \
+ $(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $${tests}" \
+ GDB=${GDB} EXPECT=${EXPECT}
clean mostlyclean:
-rm -f *~ core *.o a.out xgdb *.x $(EXECUTABLES)
diff --git a/gdb/testsuite/gdb.chill/chexp.exp b/gdb/testsuite/gdb.chill/chexp.exp
index 516582c..0d8e495 100644
--- a/gdb/testsuite/gdb.chill/chexp.exp
+++ b/gdb/testsuite/gdb.chill/chexp.exp
@@ -220,7 +220,7 @@ proc test_print_reject { args } {
}
send "$sendthis\n"
expect {
- -re ".*Invalid syntax in expression.*$prompt $" {
+ -re ".*A .* in expression.*\\.*$prompt $" {
incr passcount
return 1
}
diff --git a/gdb/testsuite/gdb.chill/chillvars.ch b/gdb/testsuite/gdb.chill/chillvars.ch
index 45b51c3..0b732c0 100644
--- a/gdb/testsuite/gdb.chill/chillvars.ch
+++ b/gdb/testsuite/gdb.chill/chillvars.ch
@@ -200,17 +200,3 @@ write_arrays ();
booleans ();
END;
-
-PR_5020: MODULE
- dummy_pr_5020: PROC ();
- END;
- NEWMODE x = STRUCT (l LONG, b BOOL);
-
- DCL y ARRAY ('a':'b') x;
-
- y('a').l := 10;
- y('a').b := TRUE;
- y('b').l := 111;
- y('b').b := FALSE;
- dummy_pr_5020 ();
-END;
diff --git a/gdb/testsuite/gdb.chill/chillvars.exp b/gdb/testsuite/gdb.chill/chillvars.exp
index 2614dd5..0e1a930 100644
--- a/gdb/testsuite/gdb.chill/chillvars.exp
+++ b/gdb/testsuite/gdb.chill/chillvars.exp
@@ -289,13 +289,11 @@ proc test_structs {} {
# 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"
+set binfile "chillvars.exe"
set srcfile $binfile.ch
if ![file exists $objdir/$subdir/$binfile] then {
- if $all_flag then {
- warning "$binfile does not exist; tests suppressed."
- }
+ warning "$binfile does not exist; tests suppressed."
} else {
do_tests
}
diff --git a/gdb/testsuite/gdb.chill/pr-5020.ch b/gdb/testsuite/gdb.chill/pr-5020.ch
new file mode 100644
index 0000000..6aba793
--- /dev/null
+++ b/gdb/testsuite/gdb.chill/pr-5020.ch
@@ -0,0 +1,19 @@
+
+PR_5020: MODULE
+ dummy_pr_5020: PROC ();
+ END;
+ NEWMODE x = STRUCT (l LONG, b BOOL);
+ NEWMODE aset = SET (aa, bb);
+
+ DCL y ARRAY ('a':'b') x;
+ DCL setarr ARRAY (aset) x;
+ DCL intarr ARRAY(10:11) x;
+ DCL boolarr ARRAY (BOOL) x;
+
+ y('a').l, setarr(aa).l, intarr(10).l, boolarr(FALSE).l := 10;
+ y('a').b, setarr(aa).b, intarr(10).b, boolarr(FALSE).b := TRUE;
+ y('b').l, setarr(bb).l, intarr(11).l, boolarr(TRUE).l := 111;
+ y('b').b, setarr(bb).b, intarr(11).b, boolarr(TRUE).b := FALSE;
+
+ dummy_pr_5020 ();
+END;
diff --git a/gdb/testsuite/gdb.chill/pr-5020.exp b/gdb/testsuite/gdb.chill/pr-5020.exp
index df72aea..902bb05 100644
--- a/gdb/testsuite/gdb.chill/pr-5020.exp
+++ b/gdb/testsuite/gdb.chill/pr-5020.exp
@@ -54,17 +54,21 @@ proc test_pr_5020 {} {
global prompt
runto dummy_pr_5020
gdb_test_exact "print y" \
- {= [ ('a') [.l: 10, .b: TRUE], ('b') [.l: 111, .b: FALSE]]}
+ {= [('a'): [.l: 10, .b: TRUE], ('b'): [.l: 111, .b: FALSE]]}
+ gdb_test_exact "print boolarr" \
+ {= [(FALSE): [.l: 10, .b: TRUE], (TRUE): [.l: 111, .b: FALSE]]}
+ gdb_test_exact "print intarr" \
+ {= [(10): [.l: 10, .b: TRUE], (11): [.l: 111, .b: FALSE]]}
+ gdb_test_exact "print setarr" \
+ {= [(aa): [.l: 10, .b: TRUE], (bb): [.l: 111, .b: FALSE]]}
send "set print pretty\n" ; expect -re "$prompt $"
gdb_test_exact "print y" \
-{= [
- (`a`) [
- .l: 10,
- .b: TRUE
- ],
- ('b') [
- .l: 111,
- .b: FALSE
+{= [('a'): [
+ .l: 10,
+ .b: TRUE
+ ], ('b'): [
+ .l: 111,
+ .b: FALSE
]]} "print y pretty"
}
@@ -72,13 +76,11 @@ proc test_pr_5020 {} {
# 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"
+set binfile "pr-5020.exe"
set srcfile $binfile.ch
if ![file exists $objdir/$subdir/$binfile] then {
- if $all_flag then {
- warning "$binfile does not exist; tests suppressed."
- }
+ warning "$objdir/$subdir/$binfile does not exist; tests suppressed."
} else {
do_tests
}