mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
teach test.sh to run valgrind when in stress testing mode
This commit is contained in:
parent
65c876b5f7
commit
c94e70060f
2
makefile
2
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:
|
||||
|
15
test/test.sh
15
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"
|
||||
|
Loading…
Reference in New Issue
Block a user