run-tests.sh exits with error code if a script fails

This commit is contained in:
David Capello 2018-08-20 14:22:36 -03:00
parent eb387898c3
commit 4325fdea65

View File

@ -32,15 +32,20 @@ EOF
echo ----------------------------------------------------------------------
echo "Testing scripts..."
result=0
for jsfile in scripts/*.js ; do
[[ $jsfile =~ console ]] && continue
echo "Running $jsfile"
if ! $ASEPRITE -b --script $jsfile > tmp ; then
fail
cat tmp
echo FAILED
result=1
fi
done
echo ----------------------------------------------------------------------
echo Done
echo ----------------------------------------------------------------------
exit $result