diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-28 10:22:48 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-28 10:22:48 +0200 |
commit | 7ec0e36e9f102279fa2aa2138fb2bd09fdf4cd49 (patch) | |
tree | 090e4bf28c7192e608e667e8e3be9f8d2d63ae7c | |
parent | d75137c755cb2c9b36af5f3aeb1f919b411c8e41 (diff) | |
download | gdb-7ec0e36e9f102279fa2aa2138fb2bd09fdf4cd49.zip gdb-7ec0e36e9f102279fa2aa2138fb2bd09fdf4cd49.tar.gz gdb-7ec0e36e9f102279fa2aa2138fb2bd09fdf4cd49.tar.bz2 |
[gdb/testsuite] Unsupport gdb.rust for remote host
With test-case gdb.rust/watch.exp and remote host I run into:
...
Executing on host: gcc watch.rs -g -lm -o watch (timeout = 300)
...
ld:watch.rs: file format not recognized; treating as linker script
ld:watch.rs:1: syntax error
...
UNTESTED: gdb.rust/watch.exp: failed to prepare
...
The problem is that find_rustc returns "" for remote host, so we fall back to gcc, which fails.
Fix this by returning 0 in allow_rust_tests for remote host.
Tested on x86_64-linux.
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 14ce39e..0d06401 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2479,6 +2479,11 @@ proc allow_rust_tests {} { return 0 } + if { [is_remote host] } { + # Proc find_rustc returns "" for remote host. + return 0 + } + # The rust compiler does not support "-m32", skip. global board board_info set board [target_info name] |