Skip to content

Commit 3c0843c

Browse files
Improve GODEBUG=fips140=only test output in buildkite (#314)
1 parent 1a782df commit 3c0843c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.buildkite/scripts/test-fipsonly.sh

100644100755
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
junitfile=$1 # filename for jnit annotation plugin
2+
junitfile=$1 # filename for junit annotation plugin
33

44
set -euo pipefail
55

@@ -11,10 +11,14 @@ with_go_junit_report
1111

1212
echo "--- Go Test fips140=only"
1313
set +e
14-
GODEBUG=fips140=only go test -tags=integration,requirefips -json -race -v ./... > test-fips-report.json
14+
GODEBUG=fips140=only go test -tags=integration,requirefips -race -v ./... > test-fips-report.txt
1515
exit_code=$?
1616
set -e
1717

18+
# Buildkite collapse logs under --- symbols
19+
# need to change --- to anything else or switch off collapsing (note: not available at the moment of this commit)
20+
awk '{gsub("---", "----"); print }' test-fips-report.txt
21+
1822
# Create Junit report for junit annotation plugin
19-
go-junit-report -parser gojson > "${junitfile:-junit-report-fips-linux.xml}" < test-fips-report.json
23+
go-junit-report > "${junitfile:-junit-report-fips-linux.xml}" < test-fips-report.txt
2024
exit $exit_code

0 commit comments

Comments
 (0)