bug-autoconf
[Top][All Lists]
Advanced

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

AT_CHECK_INTERACTIVE


From: Ralf Wildenhues
Subject: AT_CHECK_INTERACTIVE
Date: Sat, 16 Dec 2006 16:52:04 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

I'd like to have an AT_CHECK that shows progress.  Rationale:
In Libtool's testsuite, there is a usage case where the testsuite
is run inside an AT_CHECK, with a modified libtool script [1]:
  AT_SETUP([...]
  # ...
  mkdir tests
  cd tests
  AT_CHECK([$abs_srcdir/testsuite -k libtool ... $INNER_TESTSUITEFLAGS], ...)

Here, the keyword selection avoids recursion, the move to a subdirectory
avoids the issue that the file outer/testsuite.dir/NN/testsuite.log is
used by both suites, resulting in an ever-growing file.  Does anybody
see a way to warn about this in autoconf.texi without going into details
too much?

Anyway.  Things that would be nice:

- Synchronizing the outer and inner command line arguments.  For now I
  think passing INNER_TESTSUITEFLAGS='...' to the outer is enough.
- While the inner suite runs, there is absolutely no output, even with
  '-v -x': output to stdout and stderr is split, collected, and output
  separately at the end.  What I would like to see during execution is
  progressing output with both fd's intermixed; but also separated in
  the logs.

I'm thinking of something along these lines:

  mkfifo at-fifo-err
  mkfifo at-fifo-out
  command='{ sleep 2; echo out ; echo err >&2; sleep 2; exit 42; }'
  ( exec >at-fifo-out 2>at-fifo-err ; eval "$command" ) & at_cmd1=$!
  tee < at-fifo-out stdout & at_cmd2=$!
  tee < at-fifo-err stderr & at_cmd3=$!
  wait $at_cmd2 $at_cmd3 $at_cmd1

for an AT_CHECK_INTERACTIVE.  How portable is this?  It could degenerate
to current AT_CHECK on systems without mkfifo.  Are there any such
except DJGPP, MSDOS, MSYS?  Does Cygwin now have a working mkfifo?  Does
anyone know of a solution without fifos?

The wait for explicit PIDs is to not prevent independent parallel
execution done by the testsuite.at author.

Cheers,
Ralf

[1] http://thread.gmane.org/gmane.comp.gnu.libtool.general/8028/focus=7153




reply via email to

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