diff options
author | Fabian Keil <fk@fabiankeil.de> | 2014-06-19 16:40:06 +0200 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2014-07-26 23:01:31 +0200 |
commit | dc7a5981269d9e18037f3c31bc1f5d520554ad7c (patch) | |
tree | 90f5199603457a34638442e76643d36c1145931d /tests/runtests.pl | |
parent | 5828e886e69aba0d10a7a0e2fecfdbb9def4e6bd (diff) | |
download | curl-dc7a5981269d9e18037f3c31bc1f5d520554ad7c.tar.gz |
runtests.pl: Don't expect $TESTDIR/DISABLED to exist
If a non-standard $TESTDIR is used the file may not be necessary.
Previously a "missing" file resulted in the warning:
readline() on closed filehandle D at ./runtests.pl line 4940.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index da71414f8..a20af2c7b 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -4865,20 +4865,21 @@ if(!$listonly) { } ####################################################################### -# Fetch all disabled tests +# Fetch all disabled tests, if there are any # -open(D, "<$TESTDIR/DISABLED"); -while(<D>) { - if(/^ *\#/) { - # allow comments - next; - } - if($_ =~ /(\d+)/) { - $disabled{$1}=$1; # disable this test number +if(open(D, "<$TESTDIR/DISABLED")) { + while(<D>) { + if(/^ *\#/) { + # allow comments + next; + } + if($_ =~ /(\d+)/) { + $disabled{$1}=$1; # disable this test number + } } + close(D); } -close(D); ####################################################################### # If 'all' tests are requested, find out all test numbers |