summaryrefslogtreecommitdiff
path: root/test/end-to-end/cli
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-12-06 09:47:31 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-12-06 11:14:18 +0100
commit665b324e15b76472364e0e984012f0308a298b3a (patch)
tree1661102011e1db38d242cf147239783a62929e64 /test/end-to-end/cli
parent2a74efbff53c5901b4044da3531698171431cc87 (diff)
downloadjustbuild-665b324e15b76472364e0e984012f0308a298b3a.tar.gz
Log: report outputs of failed actions by default
Some actions are allowed to fail, typically tests. By reporting the output of failed such actions early, the user can already have a look at those artifacts, typically a test log, while the build is still going on.
Diffstat (limited to 'test/end-to-end/cli')
-rwxr-xr-xtest/end-to-end/cli/log-limit.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/end-to-end/cli/log-limit.sh b/test/end-to-end/cli/log-limit.sh
index cfb41498..4b209432 100755
--- a/test/end-to-end/cli/log-limit.sh
+++ b/test/end-to-end/cli/log-limit.sh
@@ -91,6 +91,10 @@ cat > TARGETS <<'EOF'
}
EOF
+
+echo FAIL > "${TEST_TMPDIR}/result"
+FAIL_HASH=$("${JUST}" add-to-cas --local-build-root "${LBR}" "${TEST_TMPDIR}/result")
+
"${JUST}" build --local-build-root "${LBR}" -f file.log \
-L '["env", "PATH='"${PATH}"'"]' \
--restrict-stderr-log-limit 1 2>console.log || :
@@ -120,7 +124,9 @@ grep TeStRuN console.log && exit 1 || :
echo
grep TeStFaIlUrE file.log
grep TeStFaIlUrE console.log
-
+# Also, their outputs should be reported
+grep "RESULT.*${FAIL_HASH}" file.log
+grep "RESULT.*${FAIL_HASH}" console.log
echo
echo
@@ -211,6 +217,9 @@ grep TeStRuN console.log && exit 1 || :
echo
grep TeStFaIlUrE file.log
grep TeStFaIlUrE console.log
+# Also, their outputs should be reported
+grep "RESULT.*${FAIL_HASH}" file.log
+grep "RESULT.*${FAIL_HASH}" console.log
echo
echo OK