]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Minor "require" fixups
authorTom Tromey <tom@tromey.com>
Wed, 25 Jan 2023 16:43:03 +0000 (09:43 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 27 Jan 2023 01:28:31 +0000 (18:28 -0700)
I found a couple of spots that could use "require", and one spot where
hoisting the "require" closer to the top of the file made it more
clear.

gdb/testsuite/gdb.btrace/enable.exp
gdb/testsuite/gdb.mi/list-thread-groups-available.exp

index 6a30d7d9187d92ed672f465a175809a624763de1..bedff46ddb602c37c7f151815cdfd489e0b4fe48 100644 (file)
@@ -76,10 +76,7 @@ gdb_exit
 # skip the rerun test when using gdbserver
 # otherwise rerun twice, target should be automatically disabled
 load_lib gdbserver-support.exp
-if {![allow_gdbserver_tests]} {
-    unsupported "target does not support gdbserver"
-    return 0
-}
+require allow_gdbserver_tests
 clean_restart $testfile
 if ![runto_main] {
     return -1
index 27224b5f96fb6a8c18a36366209a7bc9d734bdac..3ab2cab850c2b6debc027d32261b3b5f12cc8c20 100644 (file)
@@ -22,6 +22,7 @@ standard_testfile
 
 # Support for XML is needed to run this test.
 require allow_xml_test
+require can_spawn_for_attach
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
@@ -32,8 +33,6 @@ if [mi_gdb_start] {
     return
 }
 
-require can_spawn_for_attach
-
 set string_re {(?:[^\\"]|\\.)*}
 
 set id_re "id=\"$decimal\""