]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove "then" from test suite
authorTom Tromey <tromey@adacore.com>
Thu, 12 Dec 2024 14:54:51 +0000 (07:54 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 6 Jan 2025 14:01:05 +0000 (07:01 -0700)
This removes the "then" keyword from the test suite.  Andrew did this
once before, but some new ones crept in.

This also adds braces to the "if" conditions and normalizes the
failures to just use "return".

gdb/testsuite/gdb.ada/str_chars.exp
gdb/testsuite/gdb.arch/aarch64-pseudo-unwind.exp
gdb/testsuite/gdb.arch/amd64-pseudo-unwind.exp
gdb/testsuite/gdb.arch/arm-pseudo-unwind-legacy.exp
gdb/testsuite/gdb.arch/arm-pseudo-unwind.exp
gdb/testsuite/gdb.base/value-history-unavailable.exp
gdb/testsuite/gdb.python/py-connection-removed.exp
gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.exp
gdb/testsuite/gdb.python/py-watchpoint.exp

index 6d494d3ee2ca58f9e3dff6dbbd863d9c10686636..f459e3cb6d3bdd57170d067ad016ea0efcd75a46 100644 (file)
@@ -28,8 +28,8 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" }
 clean_restart ${testfile}
 
 set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
-if ![runto "foo.adb:$bp_location" ] then {
-  return -1
+if {![runto "foo.adb:$bp_location"]} {
+    return
 }
 
 gdb_test "print Arg" \
index 4319623ebc4918fb222d09bd61c0b4856b7801d8..8b7c14812a1b0fa8cd15f8bfd1c2c4fea656fb2c 100644 (file)
@@ -31,8 +31,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
-    fail "could not run to main"
+if {![runto_main]} {
+    return
 }
 
 gdb_breakpoint break_here_asm temporary
index f035f8706e78535ae04937403b511d8f2a83e641..fa82bef64483a458a989a1c5869e9c5fb85635e6 100644 (file)
@@ -34,8 +34,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
-    fail "could not run to main"
+if {![runto_main]} {
+    return
 }
 
 gdb_breakpoint break_here_asm temporary
index a8ffab06edf300b0bd1f7f18a1333110adde0ee1..bfedff245c7ca7f95648061caa3c2c27ba550286 100644 (file)
@@ -36,8 +36,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
-    fail "could not run to main"
+if {![runto_main]} {
+    return
 }
 
 gdb_breakpoint break_here_asm temporary
index 0a915c5419162000df62abf2a18a5416c9b32feb..004c606759ff2c078a7d33cc546aeb6d7dfe6107 100644 (file)
@@ -31,8 +31,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
-    fail "could not run to main"
+if {![runto_main]} {
+    return
 }
 
 gdb_breakpoint break_here_asm temporary
index 0086706bc905768189343bc89d1da8a2f6194aa5..8dc25dbc5210df22d1d6cfca3ed35841caddd32f 100644 (file)
@@ -21,9 +21,8 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
-if ![runto_main] then {
-    perror "couldn't run to breakpoint"
-    continue
+if {![runto_main]} {
+    return
 }
 
 set target_char_mask [get_valueof "/u" "a.x\[0]" "255" "get target char mask"]
index 117075a6b6abddd855899396d8dd2ef0a27d285e..28c71da865f8523aa339588a3b901ce8ab087439 100644 (file)
@@ -33,8 +33,8 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-if ![runto_main] then {
-    return 0
+if {![runto_main]} {
+    return
 }
 
 # Register a callback that will trigger when a connection is removed
index 84e839b2117538c4a2c18370bb5500854a31fa6e..4aed5c5ea93f30a4d3469607d8351ddd0b74bb24 100644 (file)
@@ -25,8 +25,8 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
     return -1
 }
 
-if ![runto_main] then {
-    return 0
+if {![runto_main]} {
+    return
 }
 
 # For remote host testing
index a3c0d7d03ea85ab091007897164dfd4bd6051e03..93619562d3ac39792753664c26e8c5f28cc45980 100644 (file)
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
 
 require allow_python_tests
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }