Pass internal gdb flags to --configuration invocations
authorTom Tromey <tom@tromey.com>
Sat, 14 Jan 2023 19:42:30 +0000 (12:42 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 14 Jan 2023 19:47:17 +0000 (12:47 -0700)
The test suite uses the --configuration flag to feature-test gdb.
However, when I added this, I neglected to pass the internal gdbflags
to this, causing an error, which then caused failures in the test
suite (which would not be seen if you'd ever run "make install").

This patch fixes the bug.  Tested by removing my install tree first,
to verify that I could reproduce the failure.

gdb/testsuite/lib/gdb-guile.exp
gdb/testsuite/lib/gdb.exp

index f2307372b8b68b531295e477796a9626b0fd4ee7..50189c8ed904ac9cba185d1049c66bca40db66d9 100644 (file)
@@ -21,7 +21,7 @@ set ghex {[0-9a-f]+}
 # Return a 1 for configurations that support Guile scripting.
 
 gdb_caching_proc allow_guile_tests {
-    set output [exec $::GDB --configuration]
+    set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"]
     return [expr {[string first "--with-guile" $output] != -1}]
 }
 
index 5359315667e6d6ac24e40623ec6b103d6deabd71..68337bd235cf1f520d7843d2ac14ca91baccfb3f 100644 (file)
@@ -2450,7 +2450,7 @@ proc allow_rust_tests {} {
 # Return a 1 for configurations that support Python scripting.
 
 gdb_caching_proc allow_python_tests {
-    set output [remote_exec host $::GDB --configuration]
+    set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"]
     return [expr {[string first "--with-python" $output] != -1}]
 }
 
@@ -2575,7 +2575,7 @@ gdb_caching_proc allow_dlmopen_tests {
 # Return 1 if we should allow TUI-related tests.
 
 gdb_caching_proc allow_tui_tests {
-    set output [remote_exec host $::GDB --configuration]
+    set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"]
     return [expr {[string first "--enable-tui" $output] != -1}]
 }