This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] gdb testsuite changes
- To: gdb-patches at sources dot redhat dot com
- Subject: [RFA] gdb testsuite changes
- From: David Taylor <taylor at cygnus dot com>
- Date: Tue, 27 Feb 2001 18:11:20 -0500
These changes were motivated by a port of gdb to target an 8 bit
processor with 2 byte integers, no C++, no long long, and very limited
memory.
ChangeLog entry:
* gdb.base/annota1.exp: Move test of isnative to earlier in the
file -- to prevent failing when the compile fails but we have no
intention of running the tests anyway.
* gdb.base/long_long.exp: Test target_info for no_long_long, skip
tests if set.
* gdb.base/maint.exp: Support 2 byte integers as well as 4 byte
integers.
* gdb.c++/ctti.exp: Skip tests if skip_cplus_tests returns true.
* gdb.c++/namespace.exp: Ditto.
Okay to commit?
Index: testsuite/gdb.base/annota1.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/annota1.exp,v
retrieving revision 1.11
diff -c -r1.11 annota1.exp
*** annota1.exp 2000/06/26 02:07:19 1.11
--- annota1.exp 2001/02/27 22:56:40
***************
*** 25,30 ****
--- 25,40 ----
}
+ # are we on a target board? If so, don't run these tests.
+ # note: this is necessary because we cannot use runto_main (which would
+ # work for remote targets too) because of the different prompt we get
+ # when using annotation level 2.
+ #
+ if ![isnative] then {
+ return 0
+ }
+
+
#
# test running programs
#
***************
*** 37,52 ****
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
- }
-
-
- # are we on a target board? If so, don't run these tests.
- # note: this is necessary because we cannot use runto_main (which would
- # work for remote targets too) because of the different prompt we get
- # when using annotation level 2.
- #
- if ![isnative] then {
- return 0
}
--- 47,52 ----
Index: testsuite/gdb.base/long_long.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/long_long.exp,v
retrieving revision 1.9
diff -c -r1.9 long_long.exp
*** long_long.exp 2000/03/14 06:47:51 1.9
--- long_long.exp 2001/02/27 22:56:40
***************
*** 1,4 ****
! # Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
***************
*** 23,28 ****
--- 23,32 ----
#
if $tracelevel then {
strace $tracelevel
+ }
+
+ if [target_info exists no_long_long] {
+ return 0
}
set testfile long_long
Index: testsuite/gdb.base/maint.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/maint.exp,v
retrieving revision 1.8
diff -c -r1.8 maint.exp
*** maint.exp 2000/11/17 16:41:31 1.8
--- maint.exp 2001/02/27 22:56:41
***************
*** 1,4 ****
! # Copyright (C) 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1998, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
***************
*** 343,349 ****
send_gdb "maint print type argc\n"
gdb_expect {
! -re "type node $hex\r\nname .int. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength 4\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\nflags $hex\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\
{ pass "maint print type" }
-re ".*$gdb_prompt $" { fail "maint print type" }
timeout { fail "(timeout) maint print type" }
--- 343,349 ----
send_gdb "maint print type argc\n"
gdb_expect {
! -re "type node $hex\r\nname .int. \\($hex\\)\r\ncode $hex \\(TYPE_CODE_INT\\)\r\nlength \[24\]\r\nobjfile $hex\r\ntarget_type $hex\r\npointer_type $hex\r\nreference_type $hex\r\nflags $hex\r\nnfields 0 $hex\r\nvptr_basetype $hex\r\nvptr_fieldno -1\r\ntype_specific $hex\r\n$gdb_prompt $"\
{ pass "maint print type" }
-re ".*$gdb_prompt $" { fail "maint print type" }
timeout { fail "(timeout) maint print type" }
cvs server: Diffing testsuite/gdb.c++
Index: testsuite/gdb.c++/ctti.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/ctti.exp,v
retrieving revision 1.3
diff -c -r1.3 ctti.exp
*** ctti.exp 2000/06/12 12:46:56 1.3
--- ctti.exp 2001/02/27 22:56:42
***************
*** 1,4 ****
! # Copyright (C) 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1998, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
***************
*** 29,34 ****
--- 29,35 ----
strace $tracelevel
}
+ if { [skip_cplus_tests] } { continue }
# 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.
Index: testsuite/gdb.c++/namespace.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/namespace.exp,v
retrieving revision 1.3
diff -c -r1.3 namespace.exp
*** namespace.exp 2000/12/20 14:34:27 1.3
--- namespace.exp 2001/02/27 22:56:42
***************
*** 1,4 ****
! # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
***************
*** 35,40 ****
--- 35,41 ----
set prms_id 0
set bug_id 0
+ if { [skip_cplus_tests] } { continue }
set testfile "namespace"
set srcfile ${testfile}.cc