GNU bug report logs - #76839
[PATCH] Fix 'Skip' behavior in erts files

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Fri, 7 Mar 2025 19:39:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Roi Martin <jroi.martin <at> gmail.com>
To: Stefan Kangas <stefankangas <at> gmail.com>, 76839 <at> debbugs.gnu.org
Subject: bug#76839: [Roi Martin] [PATCH] Fix 'Skip' behavior in erts files
Date: Sat, 08 Mar 2025 00:21:17 +0100
Stefan Kangas <stefankangas <at> gmail.com> writes:

>> +(ert-deftest ert-test-erts-skip-one ()
>> +  "Test that Skip does not affect subsequent test cases (Bug#76839)."
>> +  :expected-result :failed
>
> I think this should be avoided, because a test can fail for any reason.
>
> Can we turn the condition around, so that this test always passes?

The thing is that I need to determine that the test case following the
skipped one in the erts file has been executed.  If I know that the test
will fail, it is easy to identify that, which is why I use
':expected-result :failed'.  However, If we expect `ert-test-erts-file'
to succeed, how can I confirm that the second test case has passed
instead of being skipped as well?

I guess I could handle the `ert-test-failed' error signaled by
`ert-test-erts-file' when it calls `ert-fail', but is it much better?
Are there any other alternatives?

Thanks!




This bug report was last modified 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.