Closed ElectreAAS closed 2 years ago
To avoid another surprise in the future, could we add another unit test that runs make bench
in local-test-repo
and check that the parser succeeds on the output? :) (it could be a more complex test that checks that the identified substrings parse correctly with Yojson
, and are accepted by Current_bench_json
)
Do we have a way to call make
from inside ocaml? Otherwise the only thing that I can do is copy the json from the Makefile to a unit test
Yes there is Unix.open_process_in
to run arbitrary shell commands (and grab their output... and perhaps Unix.chdir
would also be useful here). I kind of like the idea that the unit tests are kept in sync with the local-test-repo
rather than a static file, such that we don't forget to update them :)
Thanks!
Resolves #367