Clean up unit test logs on success.

* Add a little bit of shell variable safety and tweak output.
This commit is contained in:
Edward Hennis
2015-03-13 15:12:18 -04:00
committed by Tom Ritchford
parent 803f5b5613
commit 7f1a95550f

View File

@@ -40,21 +40,22 @@ scons "${@}" || exit 1 && \
continue
fi
echo -e "\n\n\nTesting ${RIPPLED}\n\n\n"
LOG=unittest.${RUN}.log
${RIPPLED} --unittest | tee ${LOG} && \
grep -q "0 failures" ${LOG} && \
npm test --rippled=${RIPPLED} \
|| break
LOG="unittest.${RUN}.log"
"${RIPPLED}" --unittest | tee "${LOG}" && \
grep -q "0 failures" "${LOG}" && \
rm -v "${LOG}" && \
npm test --rippled="${RIPPLED}" \
|| break
success="${success} ${RUN}"
RUN=
done
if [ -n "${success}" ]
then
echo "Success on ${success}"
echo -e "\nSuccess on ${success}"
fi
if [ -n "${RUN}" ]
then
echo "Failed on ${RUN}"
echo -e "\nFailed on ${RUN}"
exit 1
fi