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 <[email protected]>
  • Loading branch information
Leonidas-from-XIV committed Aug 8, 2024
1 parent 980a561 commit eb84f6d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 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,22 @@ 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
$ ls $DUNE_CACHE_ROOT | wc -l
0

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
files
meta
temp
values
$ ls $DUNE_CACHE_ROOT | wc -l
4

Cache has been written to!

0 comments on commit eb84f6d

Please sign in to comment.