semgrep / testo

Test framework for OCaml
ISC License
16 stars 1 forks source link

Add a way to list or remove dead snapshots #58

Closed mjambon closed 4 months ago

mjambon commented 4 months ago

i.e. snapshots for tests that were renamed or no longer exist.

Suggested solution:

./test clean --snapshots

or

./test clean snapshots

would remove the test snapshots in the default location (tests/snapshots/PROJECT) that belong to no known test.

It seems that a simple ./test clean should remove the status files (in _build/testo/status/PROJECT) and that --snapshots would also remove dead snapshots rather than only removing dead snapshots.

A snapshots sub-subcommand seems logical but maybe too complicated in some ways.

Here's a proposed behavior: