mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +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
|
.PHONY: test
|
||||||
test: $(executable) $(classpath-objects) $(test-classes)
|
test: $(executable) $(classpath-objects) $(test-classes)
|
||||||
LD_LIBRARY_PATH=$(bld) /bin/bash $(test)/test.sh \
|
LD_LIBRARY_PATH=$(bld) /bin/bash $(test)/test.sh \
|
||||||
$(<) "$(flags)" $(call class-names,$(test-classes))
|
$(<) $(mode) "$(flags)" $(call class-names,$(test-classes))
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
15
test/test.sh
15
test/test.sh
@ -1,8 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
log=build/log.txt
|
log=build/log.txt
|
||||||
|
vg="valgrind --leak-check=full --num-callers=32 --db-attach=yes \
|
||||||
|
--freelist-vol=100000000"
|
||||||
|
|
||||||
vm=${1}; shift
|
vm=${1}; shift
|
||||||
|
mode=${1}; shift
|
||||||
flags=${1}; shift
|
flags=${1}; shift
|
||||||
tests=${@}
|
tests=${@}
|
||||||
|
|
||||||
@ -11,7 +14,17 @@ echo -n "" >${log}
|
|||||||
for test in ${tests}; do
|
for test in ${tests}; do
|
||||||
printf "${test}: "
|
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
|
if (( ${?} == 0 )); then
|
||||||
echo "success"
|
echo "success"
|
||||||
|
Loading…
Reference in New Issue
Block a user