automake-patches
[Top][All Lists]
Advanced

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

check-html: Always create HTML output, note conversion failure.


From: Ralf Wildenhues
Subject: check-html: Always create HTML output, note conversion failure.
Date: Sat, 28 Mar 2009 21:09:35 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

* Akim Demaille wrote on Sat, Mar 14, 2009 at 01:39:07PM CET:
> # Be sure to run check-TESTS first, and then to convert the result.
> # Beware of concurrent executions.  Run "check", not "check-TESTS",
> # since the dependencies (check_PROGRAMS and others) are attached to
> # the former, not the latter.  And expect "check" to fail.
> check-html:
>         @if $(MAKE) $(AM_MAKEFLAGS) check; then :; else \
>           rv=$$?;                                       \
>           $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML);   \
>           exit $$rv;                                    \
>         fi

I noted that this is not in line with with how check-TESTS works,
always creating $(TEST_SUITE_LOG).

This patch fixes it.  Applied to ad-parallel-tests.

Cheers,
Ralf

    check-html: Always create HTML output, note conversion failure.
    
    * lib/am/check.am (check-html): Create `$(TEST_SUITE_HTML)' in
    any case.  Exit unsuccessfully if HTML creation failed.
    * tests/parallel-tests2.test: Amend test to expose this.

diff --git a/lib/am/check.am b/lib/am/check.am
index 28af2ee..b8b512e 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -266,11 +266,11 @@ check-TESTS:
 # Be sure to run check-TESTS first, and then to convert the result.
 # Beware of concurrent executions.  And expect check-TESTS to fail.
 check-html:
-       @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then :; else   \
-         rv=$$?;                                               \
-         $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML);           \
-         exit $$rv;                                            \
-       fi
+       @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then           \
+         rv=0; else rv=$$?;                                    \
+       fi;                                                     \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
+       exit $$rv
 .PHONY: check-html
 .MAKE: check-html
 
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index 17a5108..61b05e8 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -56,4 +56,11 @@ $AUTOMAKE -a
 $MAKE check-html >stdout && { cat stdout; Exit 1; }
 cat stdout
 test -f mylog.html
+
+# Always create the HTML output, even if there were no failures.
+rm -f mylog.html
+env TESTS=foo.test $MAKE -e check-html >stdout || { cat stdout; Exit 1; }
+cat stdout
+test -f mylog.html
+
 :




reply via email to

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