Skip to content

Commit 5706e6f

Browse files
mefylrgrinberg
authored andcommitted
test: Add failing test pulling empty directory from cache.
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent f7af2d0 commit 5706e6f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Check the cache restores empty directories
2+
3+
$ export DUNE_CACHE=enabled
4+
$ export DUNE_CACHE_ROOT=$PWD/dune-cache
5+
$ cat >dune-project <<EOF
6+
> (lang dune 3.10)
7+
> (using directory-targets 0.1)
8+
> EOF
9+
10+
$ cat >dune <<EOF
11+
> (rule
12+
> (target (dir output))
13+
> (action
14+
> (progn
15+
> (run mkdir output)
16+
> (run mkdir output/child)
17+
> (run touch output/file))))
18+
> EOF
19+
20+
Build an empty directory.
21+
22+
$ dune build output
23+
$ find _build/default/output | sort
24+
_build/default/output
25+
_build/default/output/child
26+
_build/default/output/file
27+
28+
Restore it from cache.
29+
30+
$ rm -rf _build
31+
$ dune build output
32+
$ find _build/default/output | sort
33+
_build/default/output
34+
_build/default/output/file

0 commit comments

Comments
 (0)