-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting improvements #246
Conversation
What's the difference between |
It's fairly arbitrary, but I'm preserving the existing distinction. Perhaps we want to reconsider it at this stage: for instance, it makes sense for me for |
e9997e3
to
02080c2
Compare
Yes we should drop the distinction. I can't remember why I thought it was a good idea initially :p |
02080c2
to
5c32f40
Compare
... instead of the previous state of distinguishing between `FAIL' and `ERROR' states. See the discussion in mirage#246 (comment).
4e3eaf2
to
2b9e01c
Compare
@samoht: Now done. New changes:
Also trying to sneak in some general refactoring in the internal handling of data. Mostly pushing definitions and logic into a new Happy to pull these changes into a separate PR if requested. |
... instead of the previous state of distinguishing between `FAIL' and `ERROR' states. See the discussion in mirage#246 (comment).
2b9e01c
to
41b72fa
Compare
Rebased. This can now be considered for merge. |
Testing `check_basic'. | ||
This run has ID `<uuid>'. | ||
|
||
... different basic 0 bool.ASSERT bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there an ASSERT bool
in the middle of that line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using --verbose
, these asserts are interleaved with the standard output.
────────────────────────────────────────────────────────────────────────────── | ||
|
||
|
||
┌──────────────────────────────────────────────────────────────────────────────┐ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the new default behaviour to show all the failures? I don't think that's a good idea, the previous default is just to show the first one unless ALCOTEST_SHOW_ERRORS
is set (if I remember correctly).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this isn't default. There's a corresponding change to the Alcotest.run
to pass ~verbose:true
(https://github.com/mirage/alcotest/pull/246/files#diff-fb43ad350d97f3cf0e25d21ec53a881dR7).
I felt that this is a better test if all of the errors are printed.
The 'latest' symlink is less useful in projects with many different test binaries (such as this one), since each suite runner overwrites the symlink from the previous one.
This test causes plenty of trouble in CI, and seems to be not very portable. The important test is that it's possible to _override_ the default, which has been kept.
... instead of the previous state of distinguishing between `FAIL' and `ERROR' states. See the discussion in mirage#246 (comment).
41b72fa
to
f321ced
Compare
Rebased, and switched out the last change for one that doesn't use brands. |
f321ced
to
e6d77bc
Compare
... by switching to an escaped form when using the suite name as a symlink. The pretty-printed form is unaffected.
Pushed a small addition to the UTF-8 improvement that also handles printing of UTF-8 characters in suite names (previously we were just dealing with test names). This now fixes #240. Now is a good time for a second review 🙂 |
This looks very good, thanks! |
…age (1.2.0) CHANGES: - Add an `alcotest-mirage` package, allowing the construction of MirageOS unikernels that run Alcotest test suites. (mirage/alcotest#238, @hannesm @linse) - Add `Alcotest.check'`, a variant of `Alcotest.check` with labeled arguments. (mirage/alcotest#239, @hartmut27) - Add a testable for the `bytes` type. (mirage/alcotest#253, @mefyl) - Many assorted improvements to Alcotest output formatting. (mirage/alcotest#246, @craigfe) - Default to `--color=always` when running inside Dune (mirage/alcotest#242, @craigfe). The value can be overridden by setting the `ALCOTEST_COLOR` variable in a `dune` file, for example: ```dune (env (_ (env-vars (ALCOTEST_COLOR auto)))) ``` - Support all UTF-8 characters in test names and suite names, by normalising them for file-system interactions. (mirage/alcotest#249, @gs0510; mirage/alcotest#246, @craigfe) - Fix various crashes when using non-filesystem-safe characters in test suite names (these break Alcotest when attempting to generate a corresponding log file). (mirage/alcotest#241, @mefyl; mirage/alcotest#246 @craigfe)
Fixes #252 and fixes #240.
No API changes, but lots of diffs to pretty-printing logic.
Shortlist of changes:
unit Fmt.t
values rather thanstring
s);Alcotest.check
failure to be better aligned & spaced;>
;ERROR
andFAIL
states;~
).