autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make check and output to stdout/stderr


From: Rainer Gerhards
Subject: make check and output to stdout/stderr
Date: Thu, 23 Nov 2017 17:58:07 +0100

Hi all,

for some CI environments I need to have "make check" output go
directly (as it happens) to stdout and stderr. The reason is that they
abort a test due to inactivity and if a hang occurs during a test, I
am unable to get hold of the output if it is not sent to stdout/err.

I see two ways of doing that:

1. select serial test harness
This works, but I would like to keep it optional, best via a configure
option (e.g. --enable-serial-tests) because I prefer the parallel
harness where possible (and it doesn't work on older autotools
versions). I tried to look up how to do this, but besides getting the
idea that it should be possible, I have no clue of how to actually
implement this.

2. make the parallel harness output to stdout/err
This seems to be supported via AM_TESTS_FD_REDIRECT, however the only
doc on it I find is this here[1]:
====
## With this, the test scripts will be able to print diagnostic
## messages to the original standard error stream, even if the test
## driver redirects the stderr of the test scripts to a log file
## before executing them.
AM_TESTS_FD_REDIRECT = 9>&2
====
Which explicitly only states stderr. I tried to get hold of stdout by
"8>&1" and "8>&2" but to no avail.
So I wonder if there is a way to get both stdout and stderr back their
original destination. I also wonder if this is "as it happens" (but it
sounds so).

Your help would be much appreciated. As I am far from an autotools
expert, I would even more appreciate some actual code samples.

Thanks in advance,
Rainer

[1] 
https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]