projects
/
cumulus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use valgrind to check for memory leaks in the tests.
[cumulus.git]
/
tests
/
run-test
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"