Skip to content

Commit

Permalink
Make test a bit more reproducible for the future
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Kubica <marek@tarides.com>
  • Loading branch information
Leonidas-from-XIV committed Aug 8, 2024
1 parent 980a561 commit 256fdd8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/blackbox-tests/test-cases/default-cache.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The dune cache should be enabled by default
$ echo "(lang dune 3.16)" > dune-project

$ echo "(lang dune 3.17)" > dune-project

$ cat > dune << EOF
> (library
Expand All @@ -11,22 +12,24 @@ The dune cache should be enabled by default
> EOF

Set up cache directory

$ export DUNE_CACHE_ROOT=$(pwd)/dune_test_cache
$ mkdir $DUNE_CACHE_ROOT

$ DUNE_CACHE=disabled dune build
$ ls $DUNE_CACHE_ROOT

We have not written anything to the cache yet.

Change source files to force a recompilation

$ cat > foo.ml << EOF
> let f x y = x - y
> EOF

$ dune build
$ ls $DUNE_CACHE_ROOT
$ ls $DUNE_CACHE_ROOT | sort
files
meta
temp
values

Cache has been written to!

0 comments on commit 256fdd8

Please sign in to comment.