From 3542976fcea643dbde408446f9c297762c430dc2 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Tue, 24 Oct 2023 05:36:45 +0200 Subject: [PATCH] tests/runner.pm: Support to request stdin as a pipe --- tests/runner.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/runner.pm b/tests/runner.pm index 8b61eb4b3be3c9..bacfe64a6ec047 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -898,6 +898,7 @@ sub singletest_run { } my @stdintest = getpart("client", "stdin"); + my $stdincmd = ""; if(@stdintest) { my $stdinfile="$LOGDIR/stdin-for-$testnum"; @@ -910,7 +911,7 @@ sub singletest_run { writearray($stdinfile, \@stdintest); - $cmdargs .= " <$stdinfile"; + $stdincmd = $hash{'pipe'} ? "cat $stdinfile | " : "<$stdinfile "; } if(!$tool) { @@ -931,6 +932,8 @@ sub singletest_run { $CMDLINE .= "$cmdargs > " . stdoutfilename($LOGDIR, $testnum) . " 2> " . stderrfilename($LOGDIR, $testnum); + $CMDLINE = "$stdincmd$CMDLINE"; + if($verbose) { logmsg "$CMDLINE\n"; }