mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 18:34:48 +00:00
Checking shell tests exit code in tests.sh
This commit is contained in:
10
tests.sh
10
tests.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user