This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,40 @@
|
|||
Test for the "dune cache clear" command.
|
||||
|
||||
$ export DUNE_CACHE=enabled
|
||||
$ export DUNE_CACHE_ROOT=$PWD/dune-cache
|
||||
|
||||
$ cat >dune-project <<EOF
|
||||
> (lang dune 3.10)
|
||||
> EOF
|
||||
|
||||
$ cat >dune <<EOF
|
||||
> (rule (with-stdout-to foo (progn)))
|
||||
> EOF
|
||||
|
||||
$ dune build
|
||||
|
||||
$ ls $DUNE_CACHE_ROOT | sort -u
|
||||
files
|
||||
meta
|
||||
temp
|
||||
values
|
||||
|
||||
$ dune cache clear
|
||||
|
||||
$ ! test -d $DUNE_CACHE_ROOT
|
||||
|
||||
Next let us add some extra directories/files and check that they are not deleted
|
||||
by mistake.
|
||||
|
||||
$ dune build
|
||||
|
||||
$ mkdir -p $DUNE_CACHE_ROOT/extra; touch $DUNE_CACHE_ROOT/extra1 $DUNE_CACHE_ROOT/extra/extra2
|
||||
|
||||
$ dune cache clear
|
||||
Error:
|
||||
rmdir($TESTCASE_ROOT/dune-cache): Directory not empty
|
||||
[1]
|
||||
|
||||
$ find $DUNE_CACHE_ROOT -type f | sort -u
|
||||
$TESTCASE_ROOT/dune-cache/extra/extra2
|
||||
$TESTCASE_ROOT/dune-cache/extra1
|
||||
Loading…
Add table
Add a link
Reference in a new issue