Skip to content

Commit

Permalink
Checking with runclientoutput rather than redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
foopoiuyt committed Jul 9, 2019
1 parent d03dcdc commit 3eac546
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions tests/runtests.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2653,10 +2653,8 @@ sub checksystem {
@version = <VERSOUT>;
close(VERSOUT);

open(DISABLED, "server/disabled|");
@disabled = <DISABLED>;
close(DISABLED);

my $disabled = runclientoutput("server/disabled");
@disabled = split /\n/, $disabled;
if($disabled[0]) {
map s/[\r\n]//g, @disabled;
$dis = join(", ", @disabled);
Expand Down Expand Up @@ -2932,20 +2930,15 @@ sub checksystem {
"TrackMemory feature (--enable-curldebug)";
}

my $curlmanualout="$LOGDIR/curlmanualout.log";
my $manualcmd="$CURL -M 1>$curlmanualout 2>&1";
unlink($curlmanualout);
runclient($manualcmd);
open(M, "<$curlmanualout");
while(my $s = <M>) {
if($s =~ /built-in manual was disabled at build-time/) {
$has_manual = 0;
last;
}
my $manualcmd="$CURL -M 2>&1";
my $manualout = runclientoutput($manualcmd);
my @manualout = split /\n/, $manualout;
if($manualout[0] =~ /built-in manual was disabled at build-time/) {
$has_manual = 0;
}
else {
$has_manual = 1;
last;
}
close(M);

$has_shared = `sh $CURLCONFIG --built-shared`;
chomp $has_shared;
Expand Down

0 comments on commit 3eac546

Please sign in to comment.