From 6a54ab1e83648e7ad5bb4dec53f1b8aeb821da9c Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 21 Nov 2024 15:11:55 +0100 Subject: Computed-roots evaluation: improve reporting For subcomputations add the log to CAS and only report the blob identifier. Also, indicate at the beginning, that computed roots are to be computed. While there, simplify code by using the ToString() method of computed roots. --- test/end-to-end/computed-roots/basic.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/end-to-end/computed-roots/basic.sh b/test/end-to-end/computed-roots/basic.sh index 70ed2948..20fec921 100644 --- a/test/end-to-end/computed-roots/basic.sh +++ b/test/end-to-end/computed-roots/basic.sh @@ -111,10 +111,25 @@ echo Building a different computed root, without reference build echo "${JUST}" install -L '["env", "PATH='"${PATH}"'"]' \ --local-build-root "${LBRDIR}" -C repo-config.json \ - --log-limit 4 --main 'other derived' -o "${OUT}/other-derived" 2>&1 + --log-limit 4 -f "${OUT}/log" \ + --main 'other derived' -o "${OUT}/other-derived" 2>&1 echo [ "$(cat "${OUT}/other-derived/out" | wc -l)" -eq 78 ] +echo +echo Sanity-check of the log +echo +grep '[Rr]oot.*base.*evaluted.*' "${OUT}/log" > "${TMPDIR}/log_line" +cat "${TMPDIR}/log_line" +sed -i 's/.*log //' "${TMPDIR}/log_line" +"${JUST}" install-cas --local-build-root "${LBRDIR}" \ + -o "${OUT}/log.root" $(cat "${TMPDIR}/log_line") +echo +cat "${OUT}/log.root" +echo +grep 'COUNT.*12' "${OUT}/log.root" +grep '[Dd]iscovered.*1 action' "${OUT}/log.root" +grep '0 cache hit' "${OUT}/log.root" echo OK -- cgit v1.2.3