ocamltest: also announce system errors as test errors#1634
ocamltest: also announce system errors as test errors#1634gasche merged 1 commit intoocaml:trunkfrom
Conversation
|
While we're on that subject, I've been wondering why the "ocamltests" file was required at all. Don't all ocamltest tests require a "(* TEST ... *)" comment at the beginning of the file? |
2ab26ff to
37dca89
Compare
|
Thomas Refis (2018/02/26 10:28 +0000):
While we're on that subject, I've been wondering why the "ocamltests"
file was required at all. Don't all ocamltest tests require a "(* TEST
... *)" comment at the beginning of the file?
They do, but not all .ml files are tests and there may be tests that do
not end in .ml
Anyway I think this can be duscussed again after the migration when
there is only one kind of tests to handle.
|
|
If there is a serious problem such as the file not found, I don't think
this should count as a test failure.
I mean, in my opinion, such failures need to be distinguished from
regular test failures and htat's why I didn't print the message.
|
|
Not printing the message has a disadvantage: it makes it much harder for human users to find the source of the problem from the CI log output, as was demonstrated this morning. I see no advantage. (I'm not proposing to change whichever policy you have towards stderr or exit values, just to print more information on severe failure to play nice with the existing test harness. And the change is only a couple lines.) |
|
Could we get it to show up in the "Unexpected errors" count rather than the failed tests count? |
|
Sure, it's a one-line change, will do. |
|
Leo White (2018/02/26 03:36 -0800):
Could we get it to show up in the "Unexpected errors" count rather
than the failed tests count?
Yeah, I think that would be better!
|
37dca89 to
2a6872f
Compare
|
I changed to print |
|
Gabriel Scherer (2018/02/26 13:25 +0000):
I changed to print `unexpected error` instead of `failed`, which has
the desired behavior at summarization-time.
Thanks.
Would some of you consider approving the change?
Can you please update the commit message to reflect this change?
You could even retitle the PR
|
2a6872f to
03e8d25
Compare
|
I changed the commit message and PR title. |
If you forget to commit a test file with your patch (but include it in ocamltests), ocamltest will fail (print a message to standard error and return a non-zero code), but until now it would not print the standard-format "testing ... => unexpected error" message which makes the failure visible to the summarize.awk script. This commit ensures that such early failures still result in an explicit unexpected-error message being shown in the standard way, in addition to stderr-level error reporting.
If you forget to commit a test file with your patch (but include it
in ocamltests), ocamltest will fail (print a message to standard error
and return a non-zero code), but until now it would not print the
standard-format "testing ... => failed" message which makes the
failure visible to the summarize.awk script.
(See #1565 (comment))
This commit ensures that such early failures still result in an
explicit test-failed message being shown in the standard way, in
addition to stderr-level error reporting.