GNU bug report logs -
#24402
25.1.50; testcover-start breaks should-error
Previous Next
Reported by: Gemini Lasswell <gazally <at> runbox.com>
Date: Sat, 10 Sep 2016 02:19:01 UTC
Severity: normal
Tags: confirmed, fixed, patch
Found in versions 25.1.50, 26.0.50
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #44 received at 24402 <at> debbugs.gnu.org (full text, mbox):
npostavs <at> users.sourceforge.net writes:
> Alex <agrambot <at> gmail.com> writes:
>
>> npostavs <at> users.sourceforge.net writes:
>>
>>> Yes, ert binds `debugger' in order to get full backtrace information
>>> when there is an error. This means it won't see errors caught by
>>> condition-case. That's good when it ignores errors caught by test code
>>> using condition-case, but does give rise to problems. There is some
>>> relevant discussion in Bugs #11218 and #24617.
>>>
>>> Espcially the suggestion in #24617 of using `signal-hook-function' to
>>> record error info instead of using `debugger', I think doing this could
>>> simplify things a lot. It is definitely going to require messing around
>>> with ert's internals though...
>>
>> Thanks for the info. I may have discovered a workaround, but I'm not
>> sure if there's any negative side-effects. All the tests pass, though.
>>
>> What do you think of it? It's obviously not ideal, but I think it at
>> least fixes the issues at hand.
>
> Does it also work when loading the elc version of the test file? (try
> 'make check TEST_LOAD_EL=no')
Oh, it doesn't load the elc version by default? That's surprising; I
think that should be documented in the test README.
I get 3 test failures with TEST_LOAD_EL=no, but I don't believe they're
because of me. On a mostly clean master (d014a5e15) those 3 also error.
One of them is simple to fix (the (require 'subr-x) should not be inside
eval-when-compile in dom-tests). The other failing tests are
subr-test-backtrace-integration-test and cl-lib-defstruct-record.
> What about tests like this?
>
> (ert-deftest check-error-handling ()
> (should
> (eq 42
> (condition-case ()
> (/ 1 0)
> (arith-error 42)))))
It works for me, yes. As long as `debugger' is set to a symbol. I can
make it a bit more robust by using an additional defvar in
ert--run-test-internal.
Are you asking because it doesn't work for you?
This bug report was last modified 7 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.