← Commit list

ce165cda4f

Daniel Stenberg
Daniel Stenberg
2026-08-26
SUCCESS Duration: 411s

Subject

tests: support switching off the stdout redirect per-test

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/tests/FILEFORMAT.md+4 -1
@@ -589,7 +589,7 @@ command has been run.
If the variable name has no assignment, no `=`, then that variable is deleted.
-### `<command [option="no-q/no-output/no-include/no-memdebug/force-output/binary-trace"] [timeout="secs"][delay="secs"][type="perl/shell"]>`
+### `<command [option="no-q/no-output/no-stdout/no-include/no-memdebug/force-output/binary-trace"] [timeout="secs"][delay="secs"][type="perl/shell"]>`
Command line to run.
If the command spans multiple lines, they are concatenated with a space added
@@ -605,6 +605,9 @@ Set `option="no-output"` to prevent the test script to slap on the `--output`
argument that directs the output to a file. The `--output` is also not added
if the verify/stdout section is used.
+Set `option="no-stdout"` to prevent the normal stdout redirect template to be
+applied on the command line to run.
+
Set `option="force-output"` to make use of `--output` even when the test is
otherwise written to verify stdout.
tests/runner.pm+6 -2
@@ -991,8 +991,12 @@ sub singletest_run {
$CMDLINE = "$valgrindcmd $CMDLINE";
}
- $CMDLINE .= "$cmdargs > " . stdoutfilename($LOGDIR, $testnum) .
- " 2> " . stderrfilename($LOGDIR, $testnum);
+ my $redirstdout = "> " . stdoutfilename($LOGDIR, $testnum);
+ if($cmdhash{'option'} && ($cmdhash{'option'} =~ /no-stdout/)) {
+ $redirstdout = "";
+ }
+ $CMDLINE .= "$cmdargs $redirstdout".
+ " 2> " . stderrfilename($LOGDIR, $testnum);
if($verbose) {
logmsg "$CMDLINE\n";