corda/test/test.sh
Joel Dice cddea7187d preliminary support for using OpenJDK's class library
Whereas the GNU Classpath port used the strategy of patching Classpath
with core classes from Avian so as to minimize changes to the VM, this
port uses the opposite strategy: abstract and isolate
classpath-specific features in the VM similar to how we abstract away
platform-specific features in system.h.  This allows us to use an
unmodified copy of OpenJDK's class library, including its core classes
and augmented by a few VM-specific classes in the "avian" package.
2010-09-10 15:05:29 -06:00

46 lines
773 B
Bash

#!/bin/sh
log=build/log.txt
vg="nice valgrind --leak-check=full --num-callers=32 \
--freelist-vol=100000000 --error-exitcode=1"
library_path=${1}; shift
vm=${1}; shift
mode=${1}; shift
flags=${1}; shift
tests=${@}
echo -n "" >${log}
echo
for test in ${tests}; do
printf "%16s" "${test}: "
case ${mode} in
debug|debug-fast|fast|small )
LD_LIBRARY_PATH=${library_path} ${vm} ${flags} ${test} >>${log} 2>&1;;
stress* )
LD_LIBRARY_PATH=${library_path} ${vg} ${vm} ${flags} ${test} \
>>${log} 2>&1;;
* )
echo "unknown mode: ${mode}" >&2
exit 1;;
esac
if [ "${?}" = "0" ]; then
echo "success"
else
echo "fail"
trouble=1
fi
done
echo
if [ -n "${trouble}" ]; then
printf "see ${log} for output\n"
fi