From b44dcf7561fa5925b7c1821d6cf565f371272b9f Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Wed, 19 Jun 2013 10:26:42 -0700 Subject: [PATCH] Use valgrind to check for memory leaks in the tests. --- tests/run-test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/run-test b/tests/run-test index 7d3ec0c..a1fd7c5 100755 --- 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)")" +# 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 "================================================================" @@ -67,7 +70,7 @@ log_action "Running second backup..." 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" -- 2.20.1