Tezt_wrapper.UsesSourceTest dependencies.
Test.register and Regression.register take an optional argument ?uses that allows to declare that the test uses a given file.
For instance, you can define:
let data = Uses.make ~tag:"data" ~path:"data/file.dat"You would then:
~uses:[data];Uses.path data to get the path to your file.~uses:[data] adds the tag of data to the test tags.
Uses.path data checks that the current test was declared with data in its ~uses. And when you declare a test with ~uses:[data], the test checks, at the end, that Uses.path data was called. This helps to maintain the invariant that a test that uses a given file has a given tag.
Test dependencies.
Make a test dependency.
Multiple paths can be associated with the same tag, and the same paths can be associated with different tags.