Add indications in the tests

This commit is contained in:
Alejandro Sáez 2023-11-09 12:15:49 +01:00
parent 335d81de5f
commit 21dcfead0c

View File

@ -497,7 +497,6 @@ sed -i 's/const defaultGO_LDSO = `.*`/const defaultGO_LDSO = ``/' $RPM_BUILD_ROO
%endif %endif
%check %check
echo ">>> check <<<"
export GOROOT=$(pwd -P) export GOROOT=$(pwd -P)
export PATH="$GOROOT"/bin:"$PATH" export PATH="$GOROOT"/bin:"$PATH"
cd src cd src
@ -529,22 +528,25 @@ export GO_TEST_RUN=""
export GO_TEST_RUN="-run=!testshared" export GO_TEST_RUN="-run=!testshared"
%endif %endif
echo "=== Start testing ==="
%if %{fail_on_tests} %if %{fail_on_tests}
./run.bash --no-rebuild -v -v -v -k $GO_TEST_RUN ./run.bash --no-rebuild -v -v -v -k $GO_TEST_RUN
%if %{fips} %if %{fips}
echo "=== Running FIPS tests ==="
# tested25519vectors needs network connectivity but it should be cover by # tested25519vectors needs network connectivity but it should be cover by
# this test https://pkgs.devel.redhat.com/cgit/tests/golang/tree/regression/internal-testsuite/runtest.sh#n127 # this test https://pkgs.devel.redhat.com/cgit/tests/golang/tree/regression/internal-testsuite/runtest.sh#n127
# run tests with fips enabled. # run tests with fips enabled.
export GOLANG_FIPS=1 export GOLANG_FIPS=1
export OPENSSL_FORCE_FIPS_MODE=1 export OPENSSL_FORCE_FIPS_MODE=1
echo "=== Run all crypto test skipping tls ==="
pushd crypto pushd crypto
# run all crypto tests but skip tls, we will run fips specific tls tests later # run all crypto tests but skip tls, we will run fips specific tls tests later
go test $(go list ./... | grep -v tls) -v go test $(go list ./... | grep -v tls) -v
# check that signature functions have parity between boring and notboring # check that signature functions have parity between boring and notboring
CGO_ENABLED=0 go test $(go list ./... | grep -v tls) -v CGO_ENABLED=0 go test $(go list ./... | grep -v tls) -v
popd popd
echo "=== Run tls tests ==="
# run all fips specific tls tests # run all fips specific tls tests
pushd crypto/tls pushd crypto/tls
go test -v -run "Boring" go test -v -run "Boring"
@ -553,6 +555,7 @@ export GO_TEST_RUN=""
%else %else
./run.bash --no-rebuild -v -v -v -k || : ./run.bash --no-rebuild -v -v -v -k || :
%endif %endif
echo "=== End testing ==="
cd .. cd ..
%post bin %post bin