Skip to content

Commit

Permalink
tests/runner.pm: Support <stdin pipe="yes"> to request stdin as a pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuele6 committed Oct 24, 2023
1 parent 014ce7c commit 3542976
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/runner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ sub singletest_run {
}

my @stdintest = getpart("client", "stdin");
my $stdincmd = "";

if(@stdintest) {
my $stdinfile="$LOGDIR/stdin-for-$testnum";
Expand All @@ -910,7 +911,7 @@ sub singletest_run {

writearray($stdinfile, \@stdintest);

$cmdargs .= " <$stdinfile";
$stdincmd = $hash{'pipe'} ? "cat $stdinfile | " : "<$stdinfile ";
}

if(!$tool) {
Expand All @@ -931,6 +932,8 @@ sub singletest_run {
$CMDLINE .= "$cmdargs > " . stdoutfilename($LOGDIR, $testnum) .
" 2> " . stderrfilename($LOGDIR, $testnum);

$CMDLINE = "$stdincmd$CMDLINE";

if($verbose) {
logmsg "$CMDLINE\n";
}
Expand Down

0 comments on commit 3542976

Please sign in to comment.