@@ -7,7 +7,7 @@ source ../common.sh
77export LAKE_CACHE_DIR=
88
99# -------------------------------------------------------------------------------
10- # The tests covers the (offline) use of `leantar` in Lake
10+ # This test suite covers the (offline) use of `leantar` in Lake
1111# -------------------------------------------------------------------------------
1212
1313# Test regular build does not produce an `ltar`
@@ -58,13 +58,21 @@ test_exp -f .lake/build/ir/Test.ltar
5858# `--keep-local`. Since the build mapping includes module outputs and the
5959# tracked mapping only includes the `ltar`, the tracking mapping should
6060# require an unpack, whereas the build mapping should not.
61+ rm -rf .lake/build
6162test_run cache add .lake/outputs.jsonl --keep-local
6263LAKE_ARTIFACT_CACHE=true test_not_out " leantar" build +Test --no-build -v
64+ rm -rf .lake/build
6365test_run cache add .lake/outputs.jsonl
6466LAKE_ARTIFACT_CACHE=true test_out " leantar" build +Test --no-build -v
67+ rm -rf .lake/build
6568# Unpack should have overwritten the cached input with the module outputs
6669LAKE_ARTIFACT_CACHE=true test_not_out " leantar" build +Test --no-build -v
6770
71+ # Test that Lake prefers the local trace outputs over the cache
72+ rm -rf .lake/build.lib/* .[! t]*
73+ test_run cache add .lake/outputs.jsonl
74+ LAKE_ARTIFACT_CACHE=true test_not_out " leantar" build +Test --no-build -v
75+
6876# Test producing an `ltar` without already restored artifacts
6977rm -rf .lake/cache .lake/build
7078LAKE_ARTIFACT_CACHE=true test_run build +Test -v
0 commit comments