diff --git a/makefile b/makefile index 3ed3263a39..f2dd2a5d60 100644 --- a/makefile +++ b/makefile @@ -149,7 +149,7 @@ vg: $(executable) $(input) .PHONY: test test: $(executable) $(classpath-objects) $(test-classes) LD_LIBRARY_PATH=$(bld) /bin/bash $(test)/test.sh \ - $(<) "$(flags)" $(call class-names,$(test-classes)) + $(<) $(mode) "$(flags)" $(call class-names,$(test-classes)) .PHONY: clean clean: diff --git a/test/test.sh b/test/test.sh index d9c47453eb..6153742288 100644 --- a/test/test.sh +++ b/test/test.sh @@ -1,8 +1,11 @@ #!/bin/bash log=build/log.txt +vg="valgrind --leak-check=full --num-callers=32 --db-attach=yes \ +--freelist-vol=100000000" vm=${1}; shift +mode=${1}; shift flags=${1}; shift tests=${@} @@ -11,7 +14,17 @@ echo -n "" >${log} for test in ${tests}; do printf "${test}: " - ${vm} ${flags} ${test} >>${log} 2>&1 + case ${mode} in + debug ) + ${vm} ${flags} ${test} >>${log} 2>&1;; + + stress* ) + ${vg} ${vm} ${flags} ${test} >>${log} 2>&1;; + + * ) + echo "unknown mode: ${mode}" >&2 + exit 1;; + esac if (( ${?} == 0 )); then echo "success"