Travis fix error when no tests are done
This commit is contained in:
parent
1621df453d
commit
c08bd89739
|
@ -131,8 +131,11 @@ Parsing logs for new/unknown failures
|
||||||
"
|
"
|
||||||
OPJ_CI_RESULT=0
|
OPJ_CI_RESULT=0
|
||||||
|
|
||||||
awk -F: '{ print $2 }' build/Testing/Temporary/LastTestsFailed_*.log > failures.txt
|
OPJ_HAS_TESTS=$(find build -path 'build/Testing/Temporary*' -name 'LastTestsFailed*' | wc -l)
|
||||||
|
OPJ_HAS_TESTS=$(echo $OPJ_HAS_TESTS) #macos wc workaround
|
||||||
|
|
||||||
|
if [ $OPJ_HAS_TESTS -ne 0 ]; then
|
||||||
|
awk -F: '{ print $2 }' build/Testing/Temporary/LastTestsFailed_*.log > failures.txt
|
||||||
while read FAILEDTEST; do
|
while read FAILEDTEST; do
|
||||||
# Start with common errors
|
# Start with common errors
|
||||||
if grep -x "${FAILEDTEST}" ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-all.txt > /dev/null; then
|
if grep -x "${FAILEDTEST}" ${OPJ_SOURCE_DIR}/tools/travis-ci/knownfailures-all.txt > /dev/null; then
|
||||||
|
@ -146,11 +149,16 @@ while read FAILEDTEST; do
|
||||||
echo "${FAILEDTEST}"
|
echo "${FAILEDTEST}"
|
||||||
OPJ_CI_RESULT=1
|
OPJ_CI_RESULT=1
|
||||||
done < failures.txt
|
done < failures.txt
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO parse memcheck
|
# TODO parse memcheck
|
||||||
|
|
||||||
if [ ${OPJ_CI_RESULT} -eq 0 ]; then
|
if [ ${OPJ_CI_RESULT} -eq 0 ]; then
|
||||||
echo "No new/unknown failure found"
|
echo "No new/unknown failure found"
|
||||||
|
else
|
||||||
|
echo "
|
||||||
|
New/unknown failures found!!!
|
||||||
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit ${OPJ_CI_RESULT}
|
exit ${OPJ_CI_RESULT}
|
||||||
|
|
Loading…
Reference in New Issue