Files
bft/unit-tests.sh
cee894d726 Make CI supress debug logs (#319)
Signed-off-by: Yacov Manevich <[email protected]>
Co-authored-by: Sam Liokumovich <[email protected]>
2025-12-30 12:55:57 +01:00

30 lines
500 B
Bash

#!/usr/bin/env -eux bash
set -o pipefail
LOG_LEVEL=info go test -v -race ./... &> out.log
if [[ $? -ne 0 ]];then
echo "Tests failed"
cat out.log
exit 1
fi
cat out.log
echo "Checking for warnings or errors in the test output"
grep -Eq "ERR|WARN" out.log
if [[ $? -eq 0 ]];then
echo ""
echo ""
echo " ------------------------- Found warnings or errors in the test run -------------------------"
echo ""
echo ""
exit 1
fi
echo "No warnings or errors found in the test run"
exit 0