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 continue
fi fi
echo -e "\n\n\nTesting ${RIPPLED}\n\n\n" echo -e "\n\n\nTesting ${RIPPLED}\n\n\n"
LOG=unittest.${RUN}.log LOG="unittest.${RUN}.log"
${RIPPLED} --unittest | tee ${LOG} && \ "${RIPPLED}" --unittest | tee "${LOG}" && \
grep -q "0 failures" ${LOG} && \ grep -q "0 failures" "${LOG}" && \
npm test --rippled=${RIPPLED} \ rm -v "${LOG}" && \
|| break npm test --rippled="${RIPPLED}" \
|| break
success="${success} ${RUN}" success="${success} ${RUN}"
RUN= RUN=
done done
if [ -n "${success}" ] if [ -n "${success}" ]
then then
echo "Success on ${success}" echo -e "\nSuccess on ${success}"
fi fi
if [ -n "${RUN}" ] if [ -n "${RUN}" ]
then then
echo "Failed on ${RUN}" echo -e "\nFailed on ${RUN}"
exit 1 exit 1
fi fi