From a330856f734b89e878127d41a1d9b7e2882d4589 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Mon, 29 Jul 2024 13:51:51 +0200 Subject: hs-test: disable color output only in CI Type: test Change-Id: I2ca7c8e714996b1badb59253b9b856fc623ab0c3 Signed-off-by: Matus Fabian --- extras/hs-test/hs_test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extras/hs-test/hs_test.sh b/extras/hs-test/hs_test.sh index acad7ebbc75..04b546c8e59 100644 --- a/extras/hs-test/hs_test.sh +++ b/extras/hs-test/hs_test.sh @@ -116,9 +116,13 @@ if [ $leak_check_set -eq 1 ]; then exit 0 fi +if [ -n "${BUILD_NUMBER}" ]; then + ginkgo_args="$ginkgo_args --no-color" +fi + mkdir -p summary # shellcheck disable=SC2086 -sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --no-color --trace --json-report=summary/report.json $ginkgo_args -- $args +sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --trace --json-report=summary/report.json $ginkgo_args -- $args jq -r '.[0] | .SpecReports[] | select((.State == "failed") or (.State == "timedout") or (.State == "panicked")) | select(.Failure != null) | "TestName: \(.LeafNodeText)\nSuite:\n\(.Failure.FailureNodeLocation.FileName)\nMessage:\n\(.Failure.Message)\n Full Stack Trace:\n\(.Failure.Location.FullStackTrace)\n"' summary/report.json > summary/failed-summary.log \ && echo "Summary generated -> summary/failed-summary.log" -- cgit 1.2.3-korg