Skip to content

Commit

Permalink
Add a reproduction case for #2499
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <[email protected]>
  • Loading branch information
jeremiedimino committed Aug 7, 2019
1 parent 3f81ce1 commit fffb8e9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/blackbox-tests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,14 @@
test-cases/github24
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name github2499)
(deps (package dune) (source_tree test-cases/github2499))
(action
(chdir
test-cases/github2499
(progn (run %{exe:cram.exe} -test run.t) (diff? run.t run.t.corrected)))))

(alias
(name github25)
(deps (package dune) (source_tree test-cases/github25))
Expand Down Expand Up @@ -1789,6 +1797,7 @@
(alias github2228)
(alias github2272)
(alias github24)
(alias github2499)
(alias github25)
(alias github534)
(alias github568)
Expand Down Expand Up @@ -1987,6 +1996,7 @@
(alias github2228)
(alias github2272)
(alias github24)
(alias github2499)
(alias github25)
(alias github534)
(alias github568)
Expand Down
28 changes: 28 additions & 0 deletions test/blackbox-tests/test-cases/github2499/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Reproduction case for #2499: dune doesn't cleanup stale directories

$ cat >dune-project <<EOF
> (lang dune 2.0)
> EOF

$ cat >dune <<EOF
> (data_only_dirs data)
> (rule
> (deps (source_tree data))
> (action (with-stdout-to list (system "find data -type f | sort"))))
> EOF


$ mkdir -p data/{a,b}
$ touch data/{a,b}/x

$ dune build list
$ cat _build/default/list
data/a/x
data/b/x

$ rm -rf data/b

$ dune build list
$ cat _build/default/list
data/a/x
data/b/x

0 comments on commit fffb8e9

Please sign in to comment.