Skip to content

Commit

Permalink
test: directory targets and copying sandbox
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: 3931b265-92a8-4b7e-b44c-68f8dc4334e2 -->
  • Loading branch information
rgrinberg committed May 14, 2023
1 parent 417bce1 commit de24bc2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/blackbox-tests/test-cases/directory-targets/copy-sandboxing.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Sandbox a rule that depends on a directory target using the copying sandbox
mode:

$ cat >dune-project <<EOF
> (lang dune 3.8)
> (using directory-targets 0.1)
> EOF

$ cat >dune <<EOF
> (rule
> (targets (dir output))
> (action (bash "mkdir -p output/; echo x > output/x; echo y > output/y")))
> (rule
> (target foo)
> (deps (sandbox always) output/)
> (action
> (run touch foo)))
> EOF

$ dune build foo --sandbox=copy
_build/default/output -> _build/.sandbox/908b249f69e2972987db3bd03d05e45c/default/output
Error: Is a directory
-> required by _build/default/foo
[1]

0 comments on commit de24bc2

Please sign in to comment.