Skip to content

Conversation

mjambon
Copy link
Contributor

@mjambon mjambon commented Sep 11, 2025

Test framework for OCaml

CHANGES:

CHANGES:

* Fix: handle windows paths correctly CLI help output
  (semgrep/testo#121)
* Fix: correct path masking on Windows paths
  (semgrep/testo#121)
* Fix: prevent "Bad file descriptor" errors arising from output redirection on
  Windows (semgrep/testo#121)
* Fix: handle temporary file deletion cleanly on windows
  (semgrep/testo#119)
* Fix: don't set signals on Windows (semgrep/testo#118).
* Add `Testo.with_chdir` (semgrep/testo#104).
* Fix nonsensical diff formatting (semgrep/testo#104).
* Fix: enable the approval of the output of a test that is expected to
  complete but produces the incorrect output. Running the `approve`
  subcommand on such a test now successfully changes its status from
  XFAIL to XPASS ([semgrep/testo#103](semgrep/testo#103)).
* Allow multiple `-s` search queries in the same test command,
  allowing the selection of various tests by their name or hash
  ([semgrep/testo#110](semgrep/testo#110)).
* Add a `--expert` option to hide the legend printed by `run` and
  `status` ([semgrep/testo#109](semgrep/testo#109)).
* Add a `--autoclean` option to `run` and `status` subcommands to
  delete test snapshots that don't belong to any known test as it
  typically happens after tests are renamed
  ([semgrep/testo#126](semgrep/testo#126)).
* Add support for timeouts
  ([semgrep/testo#127](semgrep/testo#127)).
@mjambon
Copy link
Contributor Author

mjambon commented Sep 12, 2025

The opam-ci errors are due to a missing version constraint between the subpackages. Working on it.

@shonfeder
Copy link
Contributor

Thanks for publishing your updates! LGTM :)

@smorimoto
Copy link
Member

Could you add the x-maintenance-intent?
Ref: https://github.com/ocaml/opam-repository/blob/master/governance/policies/archiving.md

via dune-project:
  (maintenance_intent "(latest)")
mjambon added a commit to mjambon/opam-repository that referenced this pull request Sep 12, 2025
I was sent here from ocaml#28504 (comment) and it took me a while to find a way to do this from a `dune-project` file. I hope this will save others time.

This kind of tip might go better into a howto-style guide such as "how to create complete opam files for public release from a dune project?" is there is one (?).
@mjambon
Copy link
Contributor Author

mjambon commented Sep 12, 2025

@smorimoto I had this question: my opam files are generated from dune-project. Where do I put this in my dune-project?
The answer is:

(package
  ...
  (maintenance_intent "(latest)")
)

or

(maintenance_intent "(latest)")
(package ...)
(package ...)
...

There's an example at https://dune.readthedocs.io/en/latest/howto/opam-file-generation.html

My main issue is that Google didn't answer my question/query. On a related note, Google Search hasn't indexed the Testo documentation which has been up for over a year (tutorial and howtos at https://semgrep.github.io/testo/) despite crawling them. DuckDuckGo indexed them just fine.

@smorimoto smorimoto merged commit a2c85be into ocaml:master Sep 12, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants