diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-22 11:37:58 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-22 17:26:23 +0100 |
commit | c92a0fc620a3506b4a39bdd3c16024ad6992078a (patch) | |
tree | 25a6659a0a0dfa7d65e27f9ca93d63da1a8061ec /test/end-to-end/computed-roots | |
parent | 1fc94ee30c3c8b022475c1a41f4649d6db50f272 (diff) | |
download | justbuild-c92a0fc620a3506b4a39bdd3c16024ad6992078a.tar.gz |
AnalyseAndBuild: also write target-level cache entries
While there, also clean up the analysis result as soon as it
is no longer needed.
Diffstat (limited to 'test/end-to-end/computed-roots')
-rw-r--r-- | test/end-to-end/computed-roots/TARGETS | 9 | ||||
-rw-r--r-- | test/end-to-end/computed-roots/basic.sh | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/test/end-to-end/computed-roots/TARGETS b/test/end-to-end/computed-roots/TARGETS index a14d98a3..141a9ddf 100644 --- a/test/end-to-end/computed-roots/TARGETS +++ b/test/end-to-end/computed-roots/TARGETS @@ -3,7 +3,14 @@ , "name": ["basic"] , "test": ["basic.sh"] , "deps": [["", "tool-under-test"]] - , "keep": ["out/base/TARGETS", "out/derived/out", "out/other-derived/out"] + , "keep": + [ "out/base/TARGETS" + , "out/derived/out" + , "out/other-derived/out" + , "out/log" + , "out/log.root" + , "out/log2" + ] } , "TESTS": { "type": ["@", "rules", "test", "suite"] diff --git a/test/end-to-end/computed-roots/basic.sh b/test/end-to-end/computed-roots/basic.sh index 20fec921..59470ef4 100644 --- a/test/end-to-end/computed-roots/basic.sh +++ b/test/end-to-end/computed-roots/basic.sh @@ -132,4 +132,14 @@ grep 'COUNT.*12' "${OUT}/log.root" grep '[Dd]iscovered.*1 action' "${OUT}/log.root" grep '0 cache hit' "${OUT}/log.root" +echo +echo Building computed root again, expecting target-level cache hit +echo +"${JUST}" build -L '["env", "PATH='"${PATH}"'"]' \ + --local-build-root "${LBRDIR}" -C repo-config.json \ + --log-limit 4 -f "${OUT}/log2" \ + --main 'other derived' 2>&1 +echo +grep '[Ee]xport.*from cache' "${OUT}/log2" + echo OK |