This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
testsuite & missing languages
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 30 Nov 2006 15:05:22 +0000
- Subject: testsuite & missing languages
This patch is the first of a sequence to cleanup the testsuite's processing of
compilation errors. currently, for languages like ada, java & fortran, we skip
any test where the compilation fails. We don't distinguish between 'no
compiler' and 'compilation errors'. Sometimes we'll silently skip, other times
we'll generate 'untested'.
This patch adds gdb_compile_test, which parses the compiler output and
determines whether the compiler is missing (unsupported), the compiler produced
errors (fail) or the compilation succeeded (pass). I've modifed the ada, java &
fortran tests to expect this behaviour. ada and java have their own compile
procedures, which are modified to call gdb_compile_test. fortran uses
gdb_compile, and I've added a test at the end of that, when the language is
fortran, to use gdb_compile_test. As you can see, the intent is to change the C
and C++ tests to do this too. Note that the existing 'quiet' flag suppresses
this testing, and that means one will have to use it to capture preprocessor
output (or we could just check the action is 'preprocess').
This also adds skip_FOO_tests for fortran, java & ada, similar to the current
skip_cplus_tests.
tested on i686-pc-linux-gnu, ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2006-11-30 Nathan Sidwell <nathan@codesourcery.com>
gdb/testsuite/
* lib/gdb.exp (gdb_compile_test): New.
(skip_ada_tests, skip_java_tests): New.
(gdb_compile): Use gdb_compile_test for f77.
* lib/ada.exp (gdb_compile_ada): Use gdb_compile_test to record result.
* lib/java.exp (compile_java_from_source): Remove runtests check,
use gdb_compile_test to record result.
* gdb.ada/packed_array.exp, gdb.ada/fixed_points.exp,
gdb.ada/exec_changed.exp, gdb.ada/start.exp,
gdb.ada/watch_arg.exp, gdb.ada/null_record.exp,
gdb.ada/array_return.exp, gdb.ada/arrayidx.exp,
gdb.mi/mi-var-child-f.exp, gdb.fortran/types.exp,
gdb.fortran/array-element.exp, gdb.fortran/subarray.exp,
gdb.fortran/derived-type.exp, gdb.fortran/exprs.exp,
gdb.java/jmisc.exp, gdb.java/jmisc1.exp, gdb.java/jprint.exp,
gdb.java/jv-print.exp, gdb.java/jmain.exp: Add language skip,
adjust gdb_compile invocations.
Index: testsuite/gdb.ada/array_return.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/array_return.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 array_return.exp
*** testsuite/gdb.ada/array_return.exp 7 Feb 2006 19:37:46 -0000 1.2
--- testsuite/gdb.ada/array_return.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "array_return"
set testfile "${testdir}/p"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "array_return"
set testfile "${testdir}/p"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.ada/arrayidx.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/arrayidx.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 arrayidx.exp
*** testsuite/gdb.ada/arrayidx.exp 6 Oct 2006 20:48:42 -0000 1.2
--- testsuite/gdb.ada/arrayidx.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "arrayidx"
set testfile "${testdir}/p"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "arrayidx"
set testfile "${testdir}/p"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.ada/exec_changed.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/exec_changed.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 exec_changed.exp
*** testsuite/gdb.ada/exec_changed.exp 8 Mar 2005 22:19:15 -0000 1.1
--- testsuite/gdb.ada/exec_changed.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 20,25 ****
--- 20,27 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "exec_changed"
file mkdir ${objdir}/${subdir}/${testdir}
*************** set testfile1 "${testdir}/first"
*** 28,35 ****
set srcfile1 ${srcdir}/${subdir}/${testfile1}.adb
set binfile1 ${objdir}/${subdir}/${testfile1}$EXEEXT
! if {[gdb_compile_ada "${srcfile1}" "${binfile1}" executable [list debug ]] != "" } {
! return -1
}
# Build the second test program
--- 30,37 ----
set srcfile1 ${srcdir}/${subdir}/${testfile1}.adb
set binfile1 ${objdir}/${subdir}/${testfile1}$EXEEXT
! if {[gdb_compile_ada "${srcfile1}" "${binfile1}" executable {debug}] != ""} {
! return -1
}
# Build the second test program
*************** set testfile2 "${testdir}/second"
*** 37,44 ****
set srcfile2 ${srcdir}/${subdir}/${testfile2}.adb
set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT
! if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable [list debug ]] != "" } {
! return -1
}
# Start with a fresh gdb.
--- 39,46 ----
set srcfile2 ${srcdir}/${subdir}/${testfile2}.adb
set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT
! if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
! return -1
}
# Start with a fresh gdb.
Index: testsuite/gdb.ada/fixed_points.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/fixed_points.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 fixed_points.exp
*** testsuite/gdb.ada/fixed_points.exp 24 Feb 2005 23:54:03 -0000 1.3
--- testsuite/gdb.ada/fixed_points.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "fixed_points"
set testfile "${testdir}/fixed_points"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "fixed_points"
set testfile "${testdir}/fixed_points"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.ada/null_record.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/null_record.exp,v
retrieving revision 1.6
diff -c -3 -p -r1.6 null_record.exp
*** testsuite/gdb.ada/null_record.exp 24 Feb 2005 23:54:03 -0000 1.6
--- testsuite/gdb.ada/null_record.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "null_record"
set testfile "${testdir}/null_record"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "null_record"
set testfile "${testdir}/null_record"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.ada/packed_array.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/packed_array.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 packed_array.exp
*** testsuite/gdb.ada/packed_array.exp 24 Feb 2005 23:54:03 -0000 1.2
--- testsuite/gdb.ada/packed_array.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "packed_array"
set testfile "${testdir}/pa"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "packed_array"
set testfile "${testdir}/pa"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.ada/start.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/start.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 start.exp
*** testsuite/gdb.ada/start.exp 24 Feb 2005 23:54:03 -0000 1.2
--- testsuite/gdb.ada/start.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "start"
set testfile "${testdir}/dummy"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "start"
set testfile "${testdir}/dummy"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.ada/watch_arg.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/watch_arg.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 watch_arg.exp
*** testsuite/gdb.ada/watch_arg.exp 6 Oct 2006 17:46:56 -0000 1.1
--- testsuite/gdb.ada/watch_arg.exp 30 Nov 2006 14:00:29 -0000
*************** if $tracelevel then {
*** 21,34 ****
load_lib "ada.exp"
set testdir "watch_arg"
set testfile "${testdir}/watch"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
! return -1
}
gdb_exit
--- 21,36 ----
load_lib "ada.exp"
+ if { [skip_ada_tests] } { return -1 }
+
set testdir "watch_arg"
set testfile "${testdir}/watch"
set srcfile ${srcdir}/${subdir}/${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}
file mkdir ${objdir}/${subdir}/${testdir}
! if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
! return -1
}
gdb_exit
Index: testsuite/gdb.fortran/array-element.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.fortran/array-element.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 array-element.exp
*** testsuite/gdb.fortran/array-element.exp 17 Jun 2005 05:16:01 -0000 1.1
--- testsuite/gdb.fortran/array-element.exp 30 Nov 2006 14:00:30 -0000
*************** if $tracelevel then {
*** 23,34 ****
strace $tracelevel
}
set testfile "array-element"
set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
! untested "Couldn't compile ${srcfile}"
return -1
}
--- 23,36 ----
strace $tracelevel
}
+ if { [skip_fortran_tests] } { return -1 }
+
set testfile "array-element"
set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile}
! if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
! executable {debug f77}] != ""} {
return -1
}
Index: testsuite/gdb.fortran/derived-type.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.fortran/derived-type.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 derived-type.exp
*** testsuite/gdb.fortran/derived-type.exp 24 Feb 2006 07:29:42 -0000 1.1
--- testsuite/gdb.fortran/derived-type.exp 30 Nov 2006 14:00:30 -0000
*************** if $tracelevel then {
*** 23,34 ****
strace $tracelevel
}
set testfile "derived-type"
set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
! untested "Couldn't compile ${srcfile}"
return -1
}
--- 23,36 ----
strace $tracelevel
}
+ if { [skip_fortran_tests] } { return -1 }
+
set testfile "derived-type"
set srcfile ${testfile}.f90
set binfile ${objdir}/${subdir}/${testfile}
! if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
! executable {debug f77}] != ""} {
return -1
}
Index: testsuite/gdb.fortran/exprs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.fortran/exprs.exp,v
retrieving revision 1.5
diff -c -3 -p -r1.5 exprs.exp
*** testsuite/gdb.fortran/exprs.exp 20 Sep 2005 06:37:03 -0000 1.5
--- testsuite/gdb.fortran/exprs.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 24,29 ****
--- 24,31 ----
strace $tracelevel
}
+ if { [skip_fortran_tests] } { continue }
+
set prms_id 0
set bug_id 0
Index: testsuite/gdb.fortran/subarray.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.fortran/subarray.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 subarray.exp
*** testsuite/gdb.fortran/subarray.exp 20 Sep 2005 06:37:02 -0000 1.1
--- testsuite/gdb.fortran/subarray.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 23,34 ****
strace $tracelevel
}
set testfile "subarray"
set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
! untested "Couldn't compile ${srcfile}"
return -1
}
--- 23,36 ----
strace $tracelevel
}
+ if { [skip_fortran_tests] } { return -1 }
+
set testfile "subarray"
set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile}
! if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
! executable {debug f77}] != ""} {
return -1
}
Index: testsuite/gdb.fortran/types.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.fortran/types.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 types.exp
*** testsuite/gdb.fortran/types.exp 16 Dec 2002 19:33:53 -0000 1.4
--- testsuite/gdb.fortran/types.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 24,29 ****
--- 24,31 ----
strace $tracelevel
}
+ if { [skip_fortran_tests] } { continue }
+
set prms_id 0
set bug_id 0
Index: testsuite/gdb.java/jmain.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
retrieving revision 1.2
diff -c -3 -p -r1.2 jmain.exp
*** testsuite/gdb.java/jmain.exp 8 Jul 2004 21:00:45 -0000 1.2
--- testsuite/gdb.java/jmain.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 23,34 ****
load_lib "java.exp"
set testfile "jmain"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
! untested "Couldn't compile ${srcfile}"
! return -1
}
set prms_id 0
--- 23,35 ----
load_lib "java.exp"
+ if { [skip_java_tests] } { continue }
+
set testfile "jmain"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if {[compile_java_from_source ${srcfile} ${binfile} "-g"] != ""} {
! continue
}
set prms_id 0
Index: testsuite/gdb.java/jmisc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmisc.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 jmisc.exp
*** testsuite/gdb.java/jmisc.exp 7 Jul 2004 20:08:03 -0000 1.4
--- testsuite/gdb.java/jmisc.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 26,37 ****
load_lib "java.exp"
set testfile "jmisc"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
! untested "Couldn't compile ${srcfile}"
! return -1
}
# Set the current language to java. This counts as a test. If it
--- 26,38 ----
load_lib "java.exp"
+ if { [skip_java_tests] } { continue }
+
set testfile "jmisc"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if {[compile_java_from_source ${srcfile} ${binfile} "-g"] != ""} {
! continue
}
# Set the current language to java. This counts as a test. If it
Index: testsuite/gdb.java/jmisc1.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmisc1.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 jmisc1.exp
*** testsuite/gdb.java/jmisc1.exp 7 Jul 2004 20:08:03 -0000 1.3
--- testsuite/gdb.java/jmisc1.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 26,37 ****
load_lib "java.exp"
set testfile "jmisc"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
! untested "Couldn't compile ${srcfile}"
! return -1
}
# Set the current language to java. This counts as a test. If it
--- 26,38 ----
load_lib "java.exp"
+ if { [skip_java_tests] } { continue }
+
set testfile "jmisc"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if {[compile_java_from_source ${srcfile} ${binfile} "-g"] != ""} {
! continue
}
# Set the current language to java. This counts as a test. If it
Index: testsuite/gdb.java/jprint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jprint.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 jprint.exp
*** testsuite/gdb.java/jprint.exp 20 Sep 2004 20:06:29 -0000 1.1
--- testsuite/gdb.java/jprint.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 23,34 ****
load_lib "java.exp"
set testfile "jprint"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if { [compile_java_from_source ${srcfile} ${binfile} "-g"] != "" } {
! untested "Couldn't compile ${srcfile}"
! return -1
}
# Set the current language to java. This counts as a test. If it
--- 23,35 ----
load_lib "java.exp"
+ if { [skip_java_tests] } { continue }
+
set testfile "jprint"
set srcfile ${srcdir}/$subdir/${testfile}.java
set binfile ${objdir}/${subdir}/${testfile}
! if {[compile_java_from_source ${srcfile} ${binfile} "-g"] != ""} {
! continue
}
# Set the current language to java. This counts as a test. If it
Index: testsuite/gdb.java/jv-print.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jv-print.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 jv-print.exp
*** testsuite/gdb.java/jv-print.exp 15 Aug 2002 17:18:50 -0000 1.3
--- testsuite/gdb.java/jv-print.exp 30 Nov 2006 14:00:31 -0000
*************** if $tracelevel then {
*** 21,26 ****
--- 21,30 ----
strace $tracelevel
}
+ load_lib "java.exp"
+
+ if { [skip_java_tests] } { continue }
+
set prms_id 0
set bug_id 0
Index: testsuite/gdb.mi/mi-var-child-f.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child-f.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 mi-var-child-f.exp
*** testsuite/gdb.mi/mi-var-child-f.exp 27 Mar 2006 00:27:09 -0000 1.1
--- testsuite/gdb.mi/mi-var-child-f.exp 30 Nov 2006 14:00:31 -0000
***************
*** 20,25 ****
--- 20,27 ----
load_lib mi-support.exp
set MIFLAGS "-i=mi"
+ if { [skip_fortran_tests] } { return -1 }
+
gdb_exit
if [mi_gdb_start] {
continue
*************** if [mi_gdb_start] {
*** 28,35 ****
set testfile "array"
set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug f77 quiet}] != "" } {
! untested "Couldn't compile ${srcfile}"
return -1
}
--- 30,37 ----
set testfile "array"
set srcfile ${testfile}.f
set binfile ${objdir}/${subdir}/${testfile}
! if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
! executable {debug f77}] != ""} {
return -1
}
Index: testsuite/lib/ada.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/ada.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 ada.exp
*** testsuite/lib/ada.exp 3 Feb 2005 03:58:53 -0000 1.4
--- testsuite/lib/ada.exp 30 Nov 2006 14:00:32 -0000
*************** proc gdb_compile_ada {source dest type o
*** 425,433 ****
# gdb_compile to determine whether the build has succeeded or not.
# We therefore simply check whether the dest file has been created
# or not. Unless not present, the build has succeeded.
! if ![file exists $dest] {
! unsupported "Ada compilation failed: $result"
! return "Ada compilation failed."
! }
}
--- 425,432 ----
# gdb_compile to determine whether the build has succeeded or not.
# We therefore simply check whether the dest file has been created
# or not. Unless not present, the build has succeeded.
! if [file exists $dest] { set result "" }
! gdb_compile_test $source $result
! return $result
}
Index: testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.72
diff -c -3 -p -r1.72 gdb.exp
*** testsuite/lib/gdb.exp 10 Nov 2006 16:58:53 -0000 1.72
--- testsuite/lib/gdb.exp 30 Nov 2006 14:00:33 -0000
*************** proc default_gdb_start { } {
*** 1143,1148 ****
--- 1143,1164 ----
return 0;
}
+ # Examine the output of compilation to determine whether compilation
+ # failed or not. If it failed determine whether it is due to missing
+ # compiler or due to compiler error. Report pass, fail or unsupported
+ # as appropriate
+
+ proc gdb_compile_test {src output} {
+ if { $output == "" } {
+ pass "compilation [file tail $src]"
+ } elseif { [regexp {^[a-zA-Z_0-9]+: Can't find [^ ]+\.$} $output] } {
+ unsupported "compilation [file tail $src]"
+ } else {
+ verbose -log "compilation failed: $output" 2
+ fail "compilation [file tail $src]"
+ }
+ }
+
# Return a 1 for configurations for which we don't even want to try to
# test C++.
*************** proc skip_cplus_tests {} {
*** 1153,1159 ****
if { [istarget "h8300-*-*"] } {
return 1
}
-
# The C++ IO streams are too large for HC11/HC12 and are thus not
# available. The gdb C++ tests use them and don't compile.
if { [istarget "m6811-*-*"] } {
--- 1169,1174 ----
*************** proc skip_fortran_tests {} {
*** 1171,1176 ****
--- 1186,1203 ----
return 0
}
+ # Return a 1 if I don't even want to try to test ada.
+
+ proc skip_ada_tests {} {
+ return 0
+ }
+
+ # Return a 1 if I don't even want to try to test java.
+
+ proc skip_java_tests {} {
+ return 0
+ }
+
# Run a test on the target to see if it supports vmx hardware. Return 0 if so,
# 1 if it does not. Based on 'check_vmx_hw_available' from the GCC testsuite.
*************** proc gdb_compile {source dest type optio
*** 1521,1528 ****
set result [target_compile $source $dest $type $options];
regsub "\[\r\n\]*$" "$result" "" result;
regsub "^\[\r\n\]*" "$result" "" result;
! if { $result != "" && [lsearch $options quiet] == -1} {
! clone_output "gdb compile failed, $result"
}
return $result;
}
--- 1548,1562 ----
set result [target_compile $source $dest $type $options];
regsub "\[\r\n\]*$" "$result" "" result;
regsub "^\[\r\n\]*" "$result" "" result;
!
! if {[lsearch $options quiet] < 0} {
! # We shall update this on a per language basis, to avoid
! # changing the entire testsuite in one go.
! if {[lsearch $options f77] >= 0} {
! gdb_compile_test $source $result
! } elseif { $result != "" } {
! clone_output "gdb compile failed, $result"
! }
}
return $result;
}
Index: testsuite/lib/java.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/java.exp,v
retrieving revision 1.4
diff -c -3 -p -r1.4 java.exp
*** testsuite/lib/java.exp 19 Jul 2004 21:33:53 -0000 1.4
--- testsuite/lib/java.exp 30 Nov 2006 14:00:33 -0000
*************** proc java_init { args } {
*** 91,121 ****
#
proc compile_java_from_source { srcfile binfile compile_args } {
global GCJ_UNDER_TEST
- global runtests
global java_initialized
if { $java_initialized != 1 } { java_init }
- set errname [file rootname [file tail $srcfile]]
- if {! [runtest_file_p $runtests $errname]} {
- return
- }
-
set args "compiler=$GCJ_UNDER_TEST"
lappend args "additional_flags=--main=[file rootname [file tail $srcfile]]"
if { $compile_args != "" } {
lappend args "additional_flags=$compile_args"
}
! if { $compile_args != "" } {
! set errname "$errname $compile_args"
! }
!
! set x [target_compile $srcfile ${binfile} ${binfile} $args]
! if { $x != "" } {
! verbose "target_compile failed: $x" 2
! return "$errname compilation from source";
! }
}
# Local Variables:
--- 91,109 ----
#
proc compile_java_from_source { srcfile binfile compile_args } {
global GCJ_UNDER_TEST
global java_initialized
if { $java_initialized != 1 } { java_init }
set args "compiler=$GCJ_UNDER_TEST"
lappend args "additional_flags=--main=[file rootname [file tail $srcfile]]"
if { $compile_args != "" } {
lappend args "additional_flags=$compile_args"
}
! set result [target_compile $srcfile ${binfile} ${binfile} $args]
! gdb_compile_test $srcfile $result
! return $result
}
# Local Variables: