gdb/testsuite: require amd-dbgapi support to run rocm tests
authorLancelot SIX <lancelot.six@amd.com>
Mon, 6 Feb 2023 19:08:13 +0000 (19:08 +0000)
committerLancelot SIX <lancelot.six@amd.com>
Mon, 13 Feb 2023 09:42:13 +0000 (09:42 +0000)
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 <simon.marchi@efficios.com>
gdb/testsuite/lib/rocm.exp

index 1440ac85d32d0918a70be554081e7481562e14fa..a78b9f633538c29d38581ea204c76ae56a5fd45b 100644 (file)
@@ -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
 }