From: Lancelot SIX Date: Mon, 6 Feb 2023 19:08:13 +0000 (+0000) Subject: gdb/testsuite: require amd-dbgapi support to run rocm tests X-Git-Tag: binutils-2_41~1864 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=310943c20cdfbc9d5e3abe71a46c39ed0819b719;p=thirdparty%2Fbinutils-gdb.git gdb/testsuite: require amd-dbgapi support to run rocm tests Update allow_hipcc_tests to check that GDB has the amd-dbgapi support built-in. Without this support, all tests using hipcc and the rocm stack will fail. Approved-By: Simon Marchi --- diff --git a/gdb/testsuite/lib/rocm.exp b/gdb/testsuite/lib/rocm.exp index 1440ac85d32..a78b9f63353 100644 --- a/gdb/testsuite/lib/rocm.exp +++ b/gdb/testsuite/lib/rocm.exp @@ -22,6 +22,13 @@ proc allow_hipcc_tests { } { if {[target_info gdb_protocol] != ""} { return 0 } + + # Ensure that GDB is built with amd-dbgapi support. + set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"] + if { [string first "--with-amd-dbgapi" $output] == -1 } { + return 0 + } + return 1 }