summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-01-30 12:39:56 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2016-01-30 12:39:56 +0100
commit500349d305680bfa8d09528f63eab532d26c7d9e (patch)
tree21aee648b7b5382ad60268bc447fae5d1fe6eed0
parentac1d5566d30b107fdea934ac704720242ef59a7c (diff)
Add a valgrind test script.
-rw-r--r--test/midi/file1.midbin0 -> 226 bytes
-rwxr-xr-xtools/valgrind_test/valgrind_test21
2 files changed, 21 insertions, 0 deletions
diff --git a/test/midi/file1.mid b/test/midi/file1.mid
new file mode 100644
index 0000000..8d9ac5e
--- /dev/null
+++ b/test/midi/file1.mid
Binary files differ
diff --git a/tools/valgrind_test/valgrind_test b/tools/valgrind_test/valgrind_test
new file mode 100755
index 0000000..ae25dbc
--- /dev/null
+++ b/tools/valgrind_test/valgrind_test
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+valgrind_log_file="valgrind_test.log"
+dg_log_file="drumgizmo.log"
+valgrind_options="--leak-check=full --log-file=$valgrind_log_file --show-leak-kinds=all --track-origins=yes"
+midi_file="../../test/midi/file1.mid"
+wav_file_prefix="valgrind_test"
+midimap="../../test/kit/midimap.xml"
+drumkit="../../test/kit/kit1.xml"
+
+echo "========================================"
+echo "Starting the valgrind test"
+echo
+echo "Valgrind output file: $valgrind_log_file"
+echo "DrumGizmo output file: $dg_log_file"
+echo "========================================"
+echo
+
+sed -n '/LEAK SUMMARY:/,$p' $valgrind_log_file
+
+valgrind $valgrind_options ../../drumgizmo/./drumgizmo -i midifile -I file=$midi_file,midimap=$midimap -o wavfile -O file=$wav_file_prefix $drumkit > $dg_log_file