phpbb/docker/scripts/utils/get-tests-result.sh
2016-02-03 00:16:20 +01:00

16 lines
300 B
Bash
Executable file

#!/usr/bin/env bash
if [ -s build/logs/phpunit.xml ]; then
res=$(cat build/logs/sniffs_res 2>/dev/null)
if ( grep 'failures="[^0]"' build/logs/phpunit.xml ); then
res=1
elif ( grep 'errors="[^0]"' build/logs/phpunit.xml ); then
res=2
else
res=0
fi
else
res=2
fi
echo ${res}