ocurrent / current-bench

Experimental benchmarking infrastructure using OCurrent pipelines
Apache License 2.0
33 stars 17 forks source link

Fix FSA parsing numbers incorrectly in json #368

Closed ElectreAAS closed 2 years ago

ElectreAAS commented 2 years ago

Resolves #367

art-w commented 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)

ElectreAAS commented 2 years ago

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

art-w commented 2 years ago

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 :)

art-w commented 2 years ago

Thanks!