public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Unsupport gdb.rust for remote host
@ 2023-03-28  8:22 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-28  8:22 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ec0e36e9f102279fa2aa2138fb2bd09fdf4cd49

commit 7ec0e36e9f102279fa2aa2138fb2bd09fdf4cd49
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Mar 28 10:22:48 2023 +0200

    [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.

Diff:
---
 gdb/testsuite/lib/gdb.exp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 14ce39e8ed7..0d064017f09 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]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-28  8:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28  8:22 [binutils-gdb] [gdb/testsuite] Unsupport gdb.rust for remote host Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).