1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 20:54:51 +00:00

Checking shell tests exit code in tests.sh

This commit is contained in:
Davide Laezza
2019-06-17 10:48:07 +02:00
parent fd0e522f8a
commit 56b2eebfcd

View File

@@ -37,9 +37,15 @@ PYTHONPATH=dotdrop ${nosebin} -s --with-coverage --cover-package=dotdrop
[ "$1" = '--python-only' ] || {
log=`mktemp`
for scr in tests-ng/*.sh; do
${scr} 2>&1 | tee ${log}
${scr} > "${log}" 2>&1 &
tail --pid="$!" -f "${log}"
set +e
if grep Traceback ${log}; then
wait "$!"
if [ "$?" -ne 0 ]; then
echo "Test ${scr} finished with error"
rm -f ${log}
exit 1
elif grep Traceback ${log}; then
echo "crash found in logs"
rm -f ${log}
exit 1