1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-10-23 21:28:56 +03:00
Files
pgbackrest/test/lib/command/coverage
David Steele 3ab669241d Run the linter and coverage in the test command.
The linter ran in the unit command, which runs once per test module, so a run scanned the entire repository again for every test in it. Move the call to the test command, which runs once, and lint the repository copy since that is what the tests are built and run from.

The lint command was confusing to run because it linted whatever repo path it was given rather than the copy the tests are built from. Replace it with --lint-only, which does what a run does and stops once the source has been linted.

The coverage command was only ever run by the test command, as a subprocess, so call it directly and pass it the test modules that ran. An error in coverage is now reported as itself rather than as a status the caller has to translate back into an error. The coverage tests move ahead of the test command test in define.yaml since it now depends on them.

The test command is now a real command, listed in the help and noted as the default, but a run still never has to name it. Its options remain on the main parser as well since running the tests with no command is by far the most common usage, so the help must show them without being asked for the command.

The unit command is left out of the command list since the test run is what calls it, in a container where only the repository copy is available, rather than something to run by hand.
2026-07-31 17:02:00 +07:00
..