Skip to content

Commit

Permalink
Fix tests by enabling rule caching and disabling reproducability checks
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 45ba06f commit df9980d
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ This checks what happens when a file available in the cache is used in a directo

$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE=enabled
$ export DUNE_CACHE_USER_RULES=enabled
$ . ./helpers.sh

$ cat > dune-project << EOF
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
We create 2 directory targets which share a whole subdirectory.

$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE_USER_RULES=enabled
$ export DUNE_CACHE=enabled
$ . ./helpers.sh

Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/directory-targets/cache.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
We test that directory targets can go in the shared cache. See #8067.

$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE_USER_RULES=enabled
$ export DUNE_CACHE=enabled

In project a, we create a rule with a directory target. The script that creates
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/config.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Check that old cache configuration format works fine with an old language
Test that DUNE_CACHE_ROOT can be used to control the cache location

$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE_USER_RULES=enabled

Build succeeds and the 'copy' mode is respected

Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/dedup.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Test deduplication of build artifacts when using Dune cache with hard links.

$ export DUNE_CACHE=enabled
$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE_USER_RULES=enabled

$ cat > dune-project <<EOF
> (lang dune 2.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Check that Dune cache can cope with missing file/metadata entries.
> (lang dune 2.1)
> (sandboxing_preference none)
> (cache enabled)
> (cache-user-rules enabled)
> (cache-duplication copy)
> (cache-transport direct)
> EOF
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/mode-copy.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variable, and via the [DUNE_CACHE_ROOT] variable. Here we test the former.
$ cat > config <<EOF
> (lang dune 3.0)
> (cache enabled)
> (cache-user-rules enabled)
> (cache-storage-mode copy)
> EOF
$ cat > dune-project <<EOF
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variable, and via the [DUNE_CACHE_ROOT] variable. Here we test the former.
$ cat > config <<EOF
> (lang dune 2.1)
> (cache enabled)
> (cache-user-rules enabled)
> EOF
$ cat > dune-project <<EOF
> (lang dune 2.1)
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/repro-check.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Test reproducibility check
$ cat > config <<EOF
> (lang dune 3.0)
> (cache enabled)
> (cache-user-rules enabled)
> EOF
$ cat > dune-project <<EOF
> (lang dune 3.0)
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/size.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ the cache.

$ export DUNE_CACHE=enabled
$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE_USER_RULES=enabled

$ cat > config << EOF
> (lang dune 3.7)
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/symlink.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ produced symbolic links work correctly and are appropriately cached.

$ export DUNE_CACHE=enabled
$ export DUNE_CACHE_ROOT=$PWD/.cache
$ export DUNE_CACHE_USER_RULES=enabled

$ cat > dune-project <<EOF
> (lang dune 2.1)
Expand Down
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/dune-cache/trim.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$ export DUNE_CACHE=enabled
$ export DUNE_CACHE_USER_RULES=enabled
$ export XDG_RUNTIME_DIR=$PWD/.xdg-runtime
$ export XDG_CACHE_HOME=$PWD/.xdg-cache

Expand Down

0 comments on commit df9980d

Please sign in to comment.