stedolan / crowbar

Property fuzzing for OCaml
MIT License
180 stars 31 forks source link

restructure tests #22

Closed yomimono closed 6 years ago

yomimono commented 6 years ago

Remove obsolete Makefile; put examples in their own subdirectories (jbuilder seems not to like tagging multiple binaries with runtest if you don't do this, but perhaps someone with better jbuilder skills has a nicer answer). Define jbuild files for each example with the correct dependencies.

jbuilder build @runtest now builds all of the tests and runs them each in turn.

samoht commented 6 years ago

if you want to compile only one (or a set of) file per executable, you can use the modules keyword to say that. See for example: https://github.com/mirage/irmin/blob/master/test/irmin-unix/jbuild#L10

yomimono commented 6 years ago

@samoht my problem isn't making different files per executable (there are indeed examples of that all over the place), my problem is with then making jbuilder build @runtest execute all of them. As far as I can tell you can't define more than one action per alias, and defining the alias more than once in a file just redefines it, so you only get the last action.

samoht commented 6 years ago

Ha I see. In that case I think you can use progn to do a sequence of actions. It's not very elegant but could work if you need it.