blob: c5efc3239cc0ee6d3a11a236377187b287396756 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/bash
test_dir=$(dirname $0)
cd $test_dir
memcheck_log_file="valgrind_memcheck.log"
helgrind_log_file="valgrind_helgrind.log"
dg_log_file="drumgizmo.log"
memcheck_options="--tool=memcheck --log-file=$memcheck_log_file --leak-check=full --show-leak-kinds=all --track-origins=yes"
helgrind_options="--tool=helgrind --log-file=$helgrind_log_file"
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 "Memcheck output file: $memcheck_log_file"
echo "Helgrind output file: $helgrind_log_file"
echo "==========================================="
echo
echo "----------------"
echo "Running memcheck"
echo "----------------"
echo
# run memcheck and print summary
valgrind $memcheck_options ../../drumgizmo/./drumgizmo -i midifile -I file=$midi_file,midimap=$midimap -o wavfile -O file=$wav_file_prefix $drumkit > /dev/null
sed -n '/LEAK SUMMARY:/,$p' $memcheck_log_file
echo
echo "----------------"
echo "Running helgrind"
echo "----------------"
echo
# run helgrind and print summary
valgrind $helgrind_options ../../drumgizmo/./drumgizmo -i midifile -I file=$midi_file,midimap=$midimap -o wavfile -O file=$wav_file_prefix $drumkit > $dg_log_file
sed -n '/ERROR SUMMARY:/,$p' $helgrind_log_file
echo
# delete created wav files
rm *.wav
|