hs-test: disable color output only in CI 06/41306/2
authorMatus Fabian <[email protected]>
Mon, 29 Jul 2024 11:51:51 +0000 (13:51 +0200)
committerFlorin Coras <[email protected]>
Mon, 29 Jul 2024 16:02:13 +0000 (16:02 +0000)
Type: test
Change-Id: I2ca7c8e714996b1badb59253b9b856fc623ab0c3
Signed-off-by: Matus Fabian <[email protected]>
extras/hs-test/hs_test.sh

index acad7eb..04b546c 100644 (file)
@@ -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"