2009-08-06 15:58:26 -06:00
|
|
|
#!/bin/sh
|
2007-07-15 19:03:02 -06:00
|
|
|
|
|
|
|
log=build/log.txt
|
2007-07-19 17:45:44 -06:00
|
|
|
vg="nice valgrind --leak-check=full --num-callers=32 \
|
|
|
|
--freelist-vol=100000000 --error-exitcode=1"
|
2007-07-15 19:03:02 -06:00
|
|
|
|
|
|
|
vm=${1}; shift
|
2007-07-17 19:42:14 -06:00
|
|
|
mode=${1}; shift
|
2007-07-15 19:03:02 -06:00
|
|
|
flags=${1}; shift
|
|
|
|
tests=${@}
|
|
|
|
|
|
|
|
echo -n "" >${log}
|
|
|
|
|
2007-07-25 18:48:28 -06:00
|
|
|
echo
|
|
|
|
|
2007-07-15 19:03:02 -06:00
|
|
|
for test in ${tests}; do
|
2011-01-27 21:06:01 -07:00
|
|
|
printf "%24s" "${test}: "
|
2007-07-15 19:03:02 -06:00
|
|
|
|
2007-07-17 19:42:14 -06:00
|
|
|
case ${mode} in
|
2008-11-11 08:20:49 -07:00
|
|
|
debug|debug-fast|fast|small )
|
2010-11-15 20:28:53 -07:00
|
|
|
${vm} ${flags} ${test} >>${log} 2>&1;;
|
2007-07-17 19:42:14 -06:00
|
|
|
|
|
|
|
stress* )
|
2010-11-15 20:28:53 -07:00
|
|
|
${vg} ${vm} ${flags} ${test} \
|
2010-09-10 15:05:29 -06:00
|
|
|
>>${log} 2>&1;;
|
2007-07-17 19:42:14 -06:00
|
|
|
|
|
|
|
* )
|
|
|
|
echo "unknown mode: ${mode}" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
2007-07-15 19:03:02 -06:00
|
|
|
|
2009-08-06 15:58:26 -06:00
|
|
|
if [ "${?}" = "0" ]; then
|
2007-07-15 19:03:02 -06:00
|
|
|
echo "success"
|
|
|
|
else
|
|
|
|
echo "fail"
|
|
|
|
trouble=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2007-07-26 18:06:05 -06:00
|
|
|
echo
|
|
|
|
|
2007-07-15 19:03:02 -06:00
|
|
|
if [ -n "${trouble}" ]; then
|
2007-07-26 18:06:05 -06:00
|
|
|
printf "see ${log} for output\n"
|
2007-07-15 19:03:02 -06:00
|
|
|
fi
|