Re: Automake 1.11.1 glitch?

From:

Ralf Wildenhues

Subject:

Re: Automake 1.11.1 glitch?

Date:

Mon, 6 Sep 2010 21:39:54 +0200

User-agent:

Mutt/1.5.20 (2010-04-22)

I'm adding the bug-automake list for reference.
Bob reported the following failure with 'make check' inside the
parallel-tests driver of a package using lots of tests, on MinGW/MSYS,
as a regression of 1.11.1 over 1.11:
make[3]: Entering directory `/home/bfriesen/mingw/foo-static'
make[3]: execvp: /bin/sh: Invalid argument
make[3]: *** [tests/foo_bar.log] Error 127
make[3]: Leaving directory `/home/bfriesen/mingw/foo-static'
make[2]: *** [check-TESTS] Error 2
This looks like the command line length limit is exceeded.
Right now I don't yet know another workaround but to use a second
Makefile.am and split off some TESTS to that.
Having multiple testsuites in one Makefile.am was on my TODO list
(but not a very high priority yet).
The only significant change in the testsuite driver was to fix a bug
that, incidentally, you reported a while ago, namely that make check
needs to work with trailing white space in the TESTS variable:
TESTS = foo $(EMPTY)
The change pasted below is what was used to work around the above.
I would need to think about whether we can fix it in any other way,
but that probably wouldn't suffice to fix all instance of long command
lines in the testsuite driver either.
Hmm, maybe we can generate a makefile snippet on the fly, to be included
by the recursive make.
You *could* try not using parallel-tests and see whether that helps.
By the way, has your package introduced many more tests since you last
tried with 1.11 on MinGW/MSYS?
Thanks for the report,
Ralf
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -234,10 +234,11 @@ check-TESTS:
## cannot use `$?' to compute the set of lazily rerun tests, lest
## we rely on .PHONY to work portably.
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
- @set_logs=; if test "X$(TEST_LOGS)" = X.log; then \
- set_logs=TEST_LOGS=; \
- fi; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
+ @list='$(TEST_LOGS)'; \
+ list=`for f in $$list; do \
+ test .log = $$f || echo $$f; \
+ done | tr '\012\015' ' '`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"