From https://bugs.gnu.org/78850.
* lib/am/progs.am (installcheck-%DIR%PROGRAMS): Show the cause of
each failure.
* lib/am/scripts.am (installcheck-%DIR%SCRIPTS): Likewise.
* NEWS: mention this.
* Bugs fixed
+ - Improve debuggability of installcheck failures. (bug#78850)
+
- Keep Automake tests working when SOURCE_DATE_EPOCH is set.
(https://lists.gnu.org/archive/html/automake/2025-06/msg00016.html)
## Insert the directory back if nobase_ is used.
?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
for opt in --help --version; do \
- if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
- 2>c$${pid}_.err </dev/null \
- && test -n "`cat c$${pid}_.out`" \
- && test -z "`cat c$${pid}_.err`"; then :; \
- else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt \
+ >c$${pid}_.out 2>c$${pid}_.err </dev/null; \
+ xc=$$?; \
+ if test -n "`cat c$${pid}_.err`"; then \
+ echo "$$f does not support $$opt: error output" 1>&2; \
+ cat c$${pid}_.err 1>&2; \
+ bad=1; \
+ else \
+ if test -z "`cat c$${pid}_.out`"; then \
+ echo "$$f does not support $$opt: no output" 1>&2; \
+ bad=1; \
+ else \
+ if test $$xc != 0; then \
+ echo "$$f does not support $$opt: exit code $$xc" 1>&2; \
+ bad=1; \
+ else \
+ :; \
+ fi; \
+ fi; \
+ fi; \
done; \
done; rm -f c$${pid}_.???; exit $$bad
endif %?CK-OPTS%
## Insert the directory back if nobase_ is used.
?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
for opt in --help --version; do \
- if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
- 2>c$${pid}_.err </dev/null \
- && test -n "`cat c$${pid}_.out`" \
- && test -z "`cat c$${pid}_.err`"; then :; \
- else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt \
+ >c$${pid}_.out 2>c$${pid}_.err </dev/null; \
+ xc=$$?; \
+ if test -n "`cat c$${pid}_.err`"; then \
+ echo "$$f does not support $$opt: error output" 1>&2; \
+ cat c$${pid}_.err 1>&2; \
+ bad=1; \
+ else \
+ if test -z "`cat c$${pid}_.out`"; then \
+ echo "$$f does not support $$opt: no output" 1>&2; \
+ bad=1; \
+ else \
+ if test $$xc != 0; then \
+ echo "$$f does not support $$opt: exit code $$xc" 1>&2; \
+ bad=1; \
+ else \
+ :; \
+ fi; \
+ fi; \
+ fi; \
done; \
done; rm -f c$${pid}_.???; exit $$bad
endif %?CK-OPTS%