Ignoring test error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ignoring test error

Philipp Stephani
Hi,

after commit 94306c8b0d61a53b19dcee18475ea8692b001f5d 'make foo.log' in the test directory exits successfully even if the test fails. I don't think that is the best behavior, because the exit status is often used to determine whether any test has failed. Rather, 'make check' should use 'make -k' for the tests.

Philipp
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring test error

Noam Postavsky-2
On Mon, Jun 12, 2017 at 10:33 AM, Philipp Stephani
<[hidden email]> wrote:
> after commit 94306c8b0d61a53b19dcee18475ea8692b001f5d 'make foo.log' in the
> test directory exits successfully even if the test fails. I don't think that
> is the best behavior, because the exit status is often used to determine
> whether any test has failed. Rather, 'make check' should use 'make -k' for
> the tests.

How about this? (my initial attempt of just making the 'check' recipe
do '@${MAKE} -k check-doit ...' ran into the problem that the summary
was skipped on test failure)

--- i/test/Makefile.in
+++ w/test/Makefile.in
@@ -124,10 +124,9 @@ testloadfile =
 testloadfile = $*
 endif

-## Ignore any test errors so we can continue to test other files.
 %.log: %.elc
     $(AM_V_at)${MKDIR_P} $(dir $@)
-    -$(AM_V_GEN)HOME=/nonexistent $(emacs) -l ert -l $(testloadfile) \
+    $(AM_V_GEN)HOME=/nonexistent $(emacs) -l ert -l $(testloadfile) \
       --eval "(ert-run-tests-batch-and-exit ${SELECTOR_ACTUAL})" ${WRITE_LOG}

 ifeq (@HAVE_MODULES@, yes)
@@ -211,8 +210,9 @@ check-maybe:

 ## Run the tests.
 .PHONY: check-doit
-check-doit: ${LOGFILES}
-    @$(emacs) -l ert -f ert-summarize-tests-batch-and-exit $^
+check-doit:
+    -@${MAKE} -k ${LOGFILES}
+    @$(emacs) -l ert -f ert-summarize-tests-batch-and-exit ${LOGFILES}

 .PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean

Reply | Threaded
Open this post in threaded view
|

Re: Ignoring test error

Philipp Stephani


Noam Postavsky <[hidden email]> schrieb am Mo., 12. Juni 2017 um 19:04 Uhr:
On Mon, Jun 12, 2017 at 10:33 AM, Philipp Stephani
<[hidden email]> wrote:
> after commit 94306c8b0d61a53b19dcee18475ea8692b001f5d 'make foo.log' in the
> test directory exits successfully even if the test fails. I don't think that
> is the best behavior, because the exit status is often used to determine
> whether any test has failed. Rather, 'make check' should use 'make -k' for
> the tests.

How about this? (my initial attempt of just making the 'check' recipe
do '@${MAKE} -k check-doit ...' ran into the problem that the summary
was skipped on test failure)


Yes, this patch works, thanks. 
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring test error

Noam Postavsky-2
On Fri, Jun 16, 2017 at 1:12 PM, Philipp Stephani <[hidden email]> wrote:
>> How about this? (my initial attempt of just making the 'check' recipe
>> do '@${MAKE} -k check-doit ...' ran into the problem that the summary
>> was skipped on test failure)
>>
>
> Yes, this patch works, thanks.

Pushed to mater [1: 4caa8d4de4].

[1: 4caa8d4de4]: 2017-06-17 17:45:17 -0400
  * test/Makefile.in: Don't suppress test failure for single tests.
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4caa8d4de4cc9c84b2d49a75f24c1626aa3c3f73