`jbuilder build @runtest` requires some files; how to get them into workspace?

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

I believe files_recursively_in should do what you want, but I have also had some trouble getting that to work in the Real World OCaml build. Does trying to build a file in test/input/<foo> result in it being copied?

I do actually end up with test/input somewhere in _build as a result of jbuilder build @runtest, it’s just not quite where I want:

$ find _build -name input
_build/.aliases/test/input
_build/.aliases/_build/default/test/input

(not sure how I missed this before)