I’m building a project with jbuilder that has some tests that require external files. I’m having trouble figuring out how to get jbuilder to copy the files into the workspace for running tests. In this example, input
is a directory containing the required test input files. (output
is another directory that doesn’t need to contain any files, and will be created by the test if not present.)
I’ve hacked around this by having the runtest
alias specify in its arguments that it wants the input and output files from the project root with a lot of ../../..
, but that’s pretty clearly the wrong thing to do:
(alias
((name runtest)
(deps (bun.exe mon.exe))
(action (run bun "-v"
"--input=../../../test/input"
"--output=../../../test/output"
${bin:mon}))))
I’ve tried adding a dependency to the files in test/input directory as below, but I still don’t get an input
directory (or copies of any of the files in it) anywhere in _build with jbuilder build @runtest
:
(alias
((name runtest)
(deps (bun.exe mon.exe (files_recursively_in test/input)))
(action (run bun "-v"
"--input=input"
"--output=output"
${bin:mon}))))
I’m sure I’m missing something that should be obvious; terse pointers to documentation appreciated