diff options
author | Ben Elliston <bje@gnu.org> | 2016-03-28 11:53:58 +1100 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2016-03-28 11:53:58 +1100 |
commit | c3c0aef7bd632b5884d331e09be0aa5e50dce997 (patch) | |
tree | 5fcb103123a42212540d6d385f2413290f0d7610 | |
parent | 883ffd3e6dcedfccb39969fd9791e70c901410ec (diff) | |
download | dejagnu-c3c0aef7bd632b5884d331e09be0aa5e50dce997.zip dejagnu-c3c0aef7bd632b5884d331e09be0aa5e50dce997.tar.gz dejagnu-c3c0aef7bd632b5884d331e09be0aa5e50dce997.tar.bz2 |
* runtest.exp: Use 'array exists' for testing array existence
rather than 'info exists'.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | runtest.exp | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2016-03-28 Ben Elliston <bje@gnu.org> + * runtest.exp: Use 'array exists' for testing array existence + rather than 'info exists'. + +2016-03-28 Ben Elliston <bje@gnu.org> + * runtest.exp: Fixes identified by the Frink static analyser: (1) use -- in switch commands for safety, (2) remove unreachable return commands after error commands, diff --git a/runtest.exp b/runtest.exp index 6ec5e23..56865c2 100644 --- a/runtest.exp +++ b/runtest.exp @@ -1750,7 +1750,7 @@ foreach current_target $target_list { } verbose "Top level testsuite dirs are ${test_top_dirs}" 2 set testlist "" - if {[info exists all_runtests]} { + if {[array exists all_runtests]} { foreach x [array names all_runtests] { verbose "trying to glob ${srcdir}/${x}" 2 set s [glob -nocomplain ${srcdir}/$x] @@ -1876,7 +1876,7 @@ foreach current_target $target_list { # Check to see if the range of tests is limited, # set `runtests' to a list of two elements: the script name # and any arguments ("" if none). - if {[info exists all_runtests]} { + if {[array exists all_runtests]} { verbose "searching for $test_name in [array names all_runtests]" if { 0 > [lsearch [array names all_runtests] [file tail $test_name]]} { if { 0 > [lsearch [array names all_runtests] $test_name] } { |