[12/46] Use require skip_rust_tests

Message ID 20221217000818.3729389-13-tom@tromey.com
State Committed
Headers
Series Rewrite "require" test procedure and use it more often |

Commit Message

Tom Tromey Dec. 17, 2022, 12:07 a.m. UTC
  This changes some tests to use "require skip_rust_tests".
---
 gdb/testsuite/gdb.rust/dwindex.exp    | 4 +---
 gdb/testsuite/gdb.rust/expr.exp       | 2 +-
 gdb/testsuite/gdb.rust/fnfield.exp    | 4 +---
 gdb/testsuite/gdb.rust/generics.exp   | 4 +---
 gdb/testsuite/gdb.rust/methods.exp    | 4 +---
 gdb/testsuite/gdb.rust/modules.exp    | 4 +---
 gdb/testsuite/gdb.rust/pp.exp         | 4 +---
 gdb/testsuite/gdb.rust/rawids.exp     | 4 +---
 gdb/testsuite/gdb.rust/rust-style.exp | 4 +---
 gdb/testsuite/gdb.rust/simple.exp     | 4 +---
 gdb/testsuite/gdb.rust/traits.exp     | 4 +---
 gdb/testsuite/gdb.rust/unicode.exp    | 4 +---
 gdb/testsuite/gdb.rust/union.exp      | 4 +---
 gdb/testsuite/gdb.rust/unsized.exp    | 4 +---
 gdb/testsuite/gdb.rust/watch.exp      | 4 +---
 15 files changed, 15 insertions(+), 43 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp
index 09001cbba0f..a21c4a20242 100644
--- a/gdb/testsuite/gdb.rust/dwindex.exp
+++ b/gdb/testsuite/gdb.rust/dwindex.exp
@@ -16,9 +16,7 @@ 
 # Test that a rustc-produced .debug_aranges can be read.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 
diff --git a/gdb/testsuite/gdb.rust/expr.exp b/gdb/testsuite/gdb.rust/expr.exp
index 81a2aaca4c8..639c8d3f347 100644
--- a/gdb/testsuite/gdb.rust/expr.exp
+++ b/gdb/testsuite/gdb.rust/expr.exp
@@ -17,7 +17,7 @@ 
 # Rust compiler.  This serves as a smoke test.
 
 load_lib "rust-support.exp"
-if {[skip_rust_tests]} { return }
+require !skip_rust_tests
 
 gdb_start
 
diff --git a/gdb/testsuite/gdb.rust/fnfield.exp b/gdb/testsuite/gdb.rust/fnfield.exp
index 9e12f624a7f..41796e8c38f 100644
--- a/gdb/testsuite/gdb.rust/fnfield.exp
+++ b/gdb/testsuite/gdb.rust/fnfield.exp
@@ -16,9 +16,7 @@ 
 # Test trait object printing.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/generics.exp b/gdb/testsuite/gdb.rust/generics.exp
index 6dfb068c6d8..eba6fe47f58 100644
--- a/gdb/testsuite/gdb.rust/generics.exp
+++ b/gdb/testsuite/gdb.rust/generics.exp
@@ -16,9 +16,7 @@ 
 # Test expressions involving generics.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/methods.exp b/gdb/testsuite/gdb.rust/methods.exp
index f3eb943c1b7..d3f7e003045 100644
--- a/gdb/testsuite/gdb.rust/methods.exp
+++ b/gdb/testsuite/gdb.rust/methods.exp
@@ -16,9 +16,7 @@ 
 # Test method calls.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/modules.exp b/gdb/testsuite/gdb.rust/modules.exp
index 07d74956228..11814586a20 100644
--- a/gdb/testsuite/gdb.rust/modules.exp
+++ b/gdb/testsuite/gdb.rust/modules.exp
@@ -16,9 +16,7 @@ 
 # Test name lookup.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/pp.exp b/gdb/testsuite/gdb.rust/pp.exp
index e3e226c5db5..d976c79ae43 100644
--- a/gdb/testsuite/gdb.rust/pp.exp
+++ b/gdb/testsuite/gdb.rust/pp.exp
@@ -17,9 +17,7 @@ 
 
 load_lib gdb-python.exp
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/rawids.exp b/gdb/testsuite/gdb.rust/rawids.exp
index 3d2ac070bca..1d26a8f25ea 100644
--- a/gdb/testsuite/gdb.rust/rawids.exp
+++ b/gdb/testsuite/gdb.rust/rawids.exp
@@ -16,9 +16,7 @@ 
 # Test raw identifiers.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 set v [split [rust_compiler_version] .]
 if {[lindex $v 0] == 1 && [lindex $v 1] < 30} {
diff --git a/gdb/testsuite/gdb.rust/rust-style.exp b/gdb/testsuite/gdb.rust/rust-style.exp
index 8383cb743ae..0389db766a6 100644
--- a/gdb/testsuite/gdb.rust/rust-style.exp
+++ b/gdb/testsuite/gdb.rust/rust-style.exp
@@ -16,9 +16,7 @@ 
 # Test CLI output styling for Rust.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 save_vars { env(TERM) } {
     # We need an ANSI-capable terminal to get the output.
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 0fb06af9380..e6c78489c2c 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -16,9 +16,7 @@ 
 # Test expression parsing and evaluation that requires Rust compiler.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/traits.exp b/gdb/testsuite/gdb.rust/traits.exp
index 949e7cb919e..163d87c4c85 100644
--- a/gdb/testsuite/gdb.rust/traits.exp
+++ b/gdb/testsuite/gdb.rust/traits.exp
@@ -16,9 +16,7 @@ 
 # Test trait object printing.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/unicode.exp b/gdb/testsuite/gdb.rust/unicode.exp
index d091a8ac92e..ffd66c1e1d3 100644
--- a/gdb/testsuite/gdb.rust/unicode.exp
+++ b/gdb/testsuite/gdb.rust/unicode.exp
@@ -16,9 +16,7 @@ 
 # Test raw identifiers.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 # Non-ASCII identifiers were allowed starting in 1.53.
 set v [split [rust_compiler_version] .]
diff --git a/gdb/testsuite/gdb.rust/union.exp b/gdb/testsuite/gdb.rust/union.exp
index 0a786569e34..52c071dd877 100644
--- a/gdb/testsuite/gdb.rust/union.exp
+++ b/gdb/testsuite/gdb.rust/union.exp
@@ -16,9 +16,7 @@ 
 # Test of "union" for Rust.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/unsized.exp b/gdb/testsuite/gdb.rust/unsized.exp
index 59a7394a943..ffc6a22dd4f 100644
--- a/gdb/testsuite/gdb.rust/unsized.exp
+++ b/gdb/testsuite/gdb.rust/unsized.exp
@@ -16,9 +16,7 @@ 
 # Test expression parsing and evaluation that requires Rust compiler.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
diff --git a/gdb/testsuite/gdb.rust/watch.exp b/gdb/testsuite/gdb.rust/watch.exp
index 8f34c2928d9..9c3f8055dd3 100644
--- a/gdb/testsuite/gdb.rust/watch.exp
+++ b/gdb/testsuite/gdb.rust/watch.exp
@@ -16,9 +16,7 @@ 
 # Test watch -location with Rust.
 
 load_lib rust-support.exp
-if {[skip_rust_tests]} {
-    return
-}
+require !skip_rust_tests
 
 standard_testfile .rs
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {