diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-11-14 14:45:05 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-11-28 21:04:10 +0000 |
commit | d4c4542312ca16fe83c8dc8d8acce4667aa7992c (patch) | |
tree | eccc8cb7c83345f424089a039f772ca200679442 /gdb/testsuite/config/sim.exp | |
parent | f50c72da4dc7ab67ea244e9c6e97404a04700c2d (diff) | |
download | fsf-binutils-gdb-d4c4542312ca16fe83c8dc8d8acce4667aa7992c.zip fsf-binutils-gdb-d4c4542312ca16fe83c8dc8d8acce4667aa7992c.tar.gz fsf-binutils-gdb-d4c4542312ca16fe83c8dc8d8acce4667aa7992c.tar.bz2 |
gdb/testsuite: remove use of then keyword from library files
The canonical form of 'if' in modern TCL is 'if {} {}'. But there's
still a bunch of places in the testsuite where we make use of the
'then' keyword, and sometimes these get copies into new tests, which
just spreads poor practice.
This commit removes all use of the 'then' keyword from the testsuite
library files (in boards/, config/, and lib/). Previous commits have
removed all uses of the 'then' keyword from the test script files,
this commit just cleans up the library files.
There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/config/sim.exp')
-rw-r--r-- | gdb/testsuite/config/sim.exp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/testsuite/config/sim.exp b/gdb/testsuite/config/sim.exp index 8629585..57c5458 100644 --- a/gdb/testsuite/config/sim.exp +++ b/gdb/testsuite/config/sim.exp @@ -48,26 +48,26 @@ proc gdb_load { arg } { global gdb_prompt if { $arg != "" } { - if [gdb_file_cmd $arg] then { return -1 } + if {[gdb_file_cmd $arg]} { return -1 } } - if [gdb_target_sim] then { return -1 } + if {[gdb_target_sim]} { return -1 } send_gdb "load\n" gdb_expect 2400 { -re ".*$gdb_prompt $" { - if $verbose>1 then { + if {$verbose > 1} { send_user "Loaded $arg into $GDB\n" } return 0 } -re "$gdb_prompt $" { - if $verbose>1 then { + if {$verbose > 1} { perror "GDB couldn't load." } } timeout { - if $verbose>1 then { + if {$verbose > 1} { perror "Timed out trying to load $arg." } } |