Files
rippled/Builds/test-all.sh
Edward Hennis fc661c83ef Build and run tests on all available build types
* Tests include unit and integration (npm)
2015-02-24 20:28:43 -05:00

39 lines
864 B
Bash
Executable File

#/bin/sh
# Invoke as "sh ./Builds/test-all.sh"
# or first make it executable ("chmod a+rx ./Builds/test-all.sh)
# then invoke as "./Builds/test-all.sh"
#
# Build must succeed without shell aliases for this to work.
BUILD="debug release all"
success=""
scons ${BUILD} && \
for dir in ./build/*
do
if [ ! -x ${dir}/rippled ]
then
echo -e "\n\n\n${dir} is not a build dir\n\n\n"
continue
fi
RUN=$( basename ${dir} )
echo -e "\n\n\nTesting ${RUN}\n\n\n"
RIPPLED=./build/${RUN}/rippled
LOG=unittest.${RUN}.log
${RIPPLED} --unittest | tee ${LOG} && \
grep -q "0 failures" ${LOG} && \
npm test --rippled=${RIPPLED} \
|| break
success="${success} ${RUN}"
RUN=
done
if [ -n "${RUN}" ]
then
echo "Failed on ${RUN}"
fi
if [ -n "${success}" ]
then
echo "Success on ${success}"
fi