summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/hs_test.sh
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-07-29 13:51:51 +0200
committerFlorin Coras <florin.coras@gmail.com>2024-07-29 16:02:13 +0000
commita330856f734b89e878127d41a1d9b7e2882d4589 (patch)
tree0d39f87e3adedf31fc7003f6146d96717d8b3da9 /extras/hs-test/hs_test.sh
parentd464338c19346f8fd431e20df40d028accfdf2c9 (diff)
hs-test: disable color output only in CI
Type: test Change-Id: I2ca7c8e714996b1badb59253b9b856fc623ab0c3 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'extras/hs-test/hs_test.sh')
-rw-r--r--extras/hs-test/hs_test.sh6
1 files changed, 5 insertions, 1 deletions
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"