From 44a29af963e666459a7a0a8057c7282bc5ab0792 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 17 Mar 2022 08:36:01 -0600 Subject: [PATCH] Require GNAT debug info for some Ada tests A few Ada tests require some debug info in the GNAT runtime. When run without this info, these tests can't pass. This patch changes these tests to detect this situation and stop with "untested". --- gdb/testsuite/gdb.ada/interface.exp | 5 +++++ gdb/testsuite/gdb.ada/iwide.exp | 5 +++++ gdb/testsuite/gdb.ada/mi_interface.exp | 5 +++++ gdb/testsuite/gdb.ada/tagged.exp | 5 +++++ gdb/testsuite/gdb.ada/tagged_access.exp | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp index 834da12b153..06b9660113b 100644 --- a/gdb/testsuite/gdb.ada/interface.exp +++ b/gdb/testsuite/gdb.ada/interface.exp @@ -17,6 +17,11 @@ load_lib "ada.exp" if { [skip_ada_tests] } { return -1 } +if {![gnat_runtime_has_debug_info]} { + untested "GNAT runtime debuginfo required for this test" + return -1 +} + standard_ada_testfile foo if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } { diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp index 6f522ffb4f3..5d24ae5fd58 100644 --- a/gdb/testsuite/gdb.ada/iwide.exp +++ b/gdb/testsuite/gdb.ada/iwide.exp @@ -17,6 +17,11 @@ load_lib "ada.exp" if { [skip_ada_tests] } { return -1 } +if {![gnat_runtime_has_debug_info]} { + untested "GNAT runtime debuginfo required for this test" + return -1 +} + standard_ada_testfile p if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } { diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp index 89e2fde7b7b..fa176e21ef1 100644 --- a/gdb/testsuite/gdb.ada/mi_interface.exp +++ b/gdb/testsuite/gdb.ada/mi_interface.exp @@ -17,6 +17,11 @@ load_lib "ada.exp" if { [skip_ada_tests] } { return -1 } +if {![gnat_runtime_has_debug_info]} { + untested "GNAT runtime debuginfo required for this test" + return -1 +} + standard_ada_testfile foo if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat12 ]] != "" } { diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp index 0e9d15faa0c..6fb8a418149 100644 --- a/gdb/testsuite/gdb.ada/tagged.exp +++ b/gdb/testsuite/gdb.ada/tagged.exp @@ -17,6 +17,11 @@ load_lib "ada.exp" if { [skip_ada_tests] } { return -1 } +if {![gnat_runtime_has_debug_info]} { + untested "GNAT runtime debuginfo required for this test" + return -1 +} + standard_ada_testfile foo if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } { diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp index 664a50deb09..3649c5474a7 100644 --- a/gdb/testsuite/gdb.ada/tagged_access.exp +++ b/gdb/testsuite/gdb.ada/tagged_access.exp @@ -17,6 +17,11 @@ load_lib "ada.exp" if { [skip_ada_tests] } { return -1 } +if {![gnat_runtime_has_debug_info]} { + untested "GNAT runtime debuginfo required for this test" + return -1 +} + standard_ada_testfile p if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } { -- 2.30.2