[gdb/testsuite] Allow gdb.rust/expr.exp without rust compiler
authorTom de Vries <tdevries@suse.de>
Tue, 28 Mar 2023 08:22:48 +0000 (10:22 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 28 Mar 2023 08:22:48 +0000 (10:22 +0200)
commitd7f0f10189fa83a73d9819e81fd321142c0c6398
tree0c530f2227dd936bb994f3188279df669f5f2de7
parent29dd2d27b202cb4f16c77008e8b71b5554b435fc
[gdb/testsuite] Allow gdb.rust/expr.exp without rust compiler

Proc allow_rust_tests returns 0 when there's no rust compiler, but that gives
the wrong answer for gdb.rust/expr.exp, which doesn't require it.

Fix this by using can_compile rust in the test-cases that need it, and just
returning 1 in allow_rust_tests.

Tested on x86_64-linux.
20 files changed:
gdb/testsuite/gdb.rust/completion.exp
gdb/testsuite/gdb.rust/dwindex.exp
gdb/testsuite/gdb.rust/finish.exp
gdb/testsuite/gdb.rust/fnfield.exp
gdb/testsuite/gdb.rust/generics.exp
gdb/testsuite/gdb.rust/main-crash.exp
gdb/testsuite/gdb.rust/methods.exp
gdb/testsuite/gdb.rust/modules.exp
gdb/testsuite/gdb.rust/onetwoeight.exp
gdb/testsuite/gdb.rust/pp.exp
gdb/testsuite/gdb.rust/rawids.exp
gdb/testsuite/gdb.rust/rust-start.exp
gdb/testsuite/gdb.rust/rust-style.exp
gdb/testsuite/gdb.rust/simple.exp
gdb/testsuite/gdb.rust/traits.exp
gdb/testsuite/gdb.rust/unicode.exp
gdb/testsuite/gdb.rust/union.exp
gdb/testsuite/gdb.rust/unsized.exp
gdb/testsuite/gdb.rust/watch.exp
gdb/testsuite/lib/gdb.exp