Commit Graph

13 Commits

Author SHA1 Message Date
Louis Gesbert
97940c2cb6 Clerk report: better diff coloring 2024-07-08 14:52:28 +02:00
Louis Gesbert
03e74b505d Cleanup 2024-07-04 15:08:13 +02:00
Louis Gesbert
29cb1978e0 Clerk report: add JUnit-compatible XML output 2024-07-04 14:47:50 +02:00
Louis Gesbert
cdb31ffd57
Support for basic clerk.toml configuration files (#639) 2024-07-01 15:40:06 +02:00
Louis Gesbert
2d756698fb clerk report: allow to choose diff command
Also, detect non-GNU diff or absence of colors, and fallback to a basic view;
this is actually more readable in logs or diffs.
2024-06-27 12:06:24 +02:00
Louis Gesbert
31adaa019f Clerk report: disambiguate empty and missing ref lines 2024-06-24 10:18:19 +02:00
Louis Gesbert
38a93424a8 Clerk reports: postprocess diff output
This relies less on specific color flags of GNU diff, and reformats and
colorises the output.
(it may still depend on the specific layout of GNU diff with the `-y` flag
though)
2024-06-21 18:19:09 +02:00
Louis Gesbert
dc1b725e9b Reformat 2024-06-21 12:23:01 +02:00
Louis Gesbert
71fdaab262 Clerk reports: add -I flags to repro commands 2024-06-21 12:23:01 +02:00
Louis Gesbert
69e862a9d1 Clerk report: avoid Seq.Forced_twice error on incomplete test input 2024-06-21 12:16:49 +02:00
Louis Gesbert
859a602c0b
Clerk reports: add verbosity flags
`--summary`
`--short`
`--failures` (default)
`--verbose`

(`--debug` also adds some detail, e.g. the commands to reproduce non-failing
tests, or the files without failures in the default mode)
2024-06-19 16:10:26 +02:00
Louis Gesbert
80400d838a
Messages: improve string padding processing 2024-06-19 16:10:26 +02:00
Louis Gesbert
45b0feaf20
Generate tests reports from 'clerk test'
This is a proper replacement for the previous shell-based placeholder hack.

Here is a summary:

- `clerk runtest` (normally run by ninja) is much extended:
  * besides generating the test@out file, it checks individual tests for success
    and can write a report file containing their status, and the positions for
    their (expected/current) outputs (this uses `Marshal`)
  * it now handles out-tests directly in addition to inline-tests, for which
    it generates the separate output file ; they are included in the report

- ninja is now tasked with building all the test reports (which shouldn't fail);
  for directories, individual reports are concatenated (as before).
  Removing intermediate report rules, and out-test rules means that the ninja
  file is much simplified.

- then, clerk takes back control, reads the final reports and formats them in a
  user-friendly way. Printing the reports may imply running `diff` internally.
  In particular, the commands to easily reproduce each test are provided.
  Resetting the test results if required is also done directly by clerk, at this
  stage.

A few switches are available to customise the output, but I am waiting for some
feedback before deciding what to make available from the CLI.

The `clerk report` command is available to manually explore test reports, but
normally the processing is done directly at the end of `clerk test` (i.e. ninja
will no longer call that command)
2024-06-19 16:10:26 +02:00