projects
/
cumulus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01776f6
)
Use valgrind to check for memory leaks in the tests.
author
Michael Vrable
<vrable@cs.hmc.edu>
Wed, 19 Jun 2013 17:26:42 +0000
(10:26 -0700)
committer
Michael Vrable
<vrable@cs.hmc.edu>
Sun, 26 Jan 2014 20:43:43 +0000
(12:43 -0800)
tests/run-test
patch
|
blob
|
history
diff --git
a/tests/run-test
b/tests/run-test
index
7d3ec0c
..
a1fd7c5
100755
(executable)
--- a/
tests/run-test
+++ b/
tests/run-test
@@
-31,6
+31,9
@@
BIN_DIR="$(readlink -f "$TEST_DIR/..")"
# Directory where temporary files used for the tests can be stored.
TMP_DIR="$(readlink -f "$(mktemp -d cumulus-tests.XXXXXX)")"
# Directory where temporary files used for the tests can be stored.
TMP_DIR="$(readlink -f "$(mktemp -d cumulus-tests.XXXXXX)")"
+# Command to use for running memory leak tests.
+VALGRIND="valgrind --tool=memcheck --leak-check=full --log-file=$TMP_DIR/valgrind.log"
+
log_action() {
echo
echo "================================================================"
log_action() {
echo
echo "================================================================"
@@
-67,7
+70,7
@@
log_action "Running second backup..."
sleep 5
BACKUP_DIR="$TMP_DIR/backups"
mkdir "$BACKUP_DIR"
sleep 5
BACKUP_DIR="$TMP_DIR/backups"
mkdir "$BACKUP_DIR"
-"$BIN_DIR"/cumulus --dest="$BACKUP_DIR" --localdb="$LOCALDB" \
+
$VALGRIND
"$BIN_DIR"/cumulus --dest="$BACKUP_DIR" --localdb="$LOCALDB" \
--scheme=test -v "$TREE"
log_action "Restoring snapshots"
--scheme=test -v "$TREE"
log_action "Restoring snapshots"