-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathtc-valgrind-utils.sh
executable file
·68 lines (61 loc) · 2.33 KB
/
tc-valgrind-utils.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
set -xe
# How to generate / update valgrind suppression lists:
# https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto#How_to_make_a_suppression_file
#
# $ valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=minimalraw.log ./minimal
# $ cat ./minimalraw.log | ./parse_valgrind_suppressions.sh > minimal.supp
VALGRIND_CMD=${VALGRIND_CMD:-"valgrind \
--error-exitcode=4242 \
--errors-for-leak-kinds=all \
--leak-check=full \
--leak-resolution=high \
--show-reachable=yes \
--track-origins=yes \
--gen-suppressions=all \
--suppressions=${DS_DSDIR}/ds_generic.supp \
--suppressions=${DS_DSDIR}/ds_lib.supp \
--suppressions=${DS_DSDIR}/ds_sox.supp \
--suppressions=${DS_DSDIR}/ds_openfst.supp \
--suppressions=${DS_DSDIR}/tensorflow_full_runtime.supp \
--suppressions=${DS_DSDIR}/tensorflow_tflite_runtime.supp \
"}
run_valgrind_basic()
{
${VALGRIND_CMD} --log-file=${TASKCLUSTER_ARTIFACTS}/valgrind_basic.log \
deepspeech \
--model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} \
--scorer ${TASKCLUSTER_TMP_DIR}/kenlm.scorer \
--audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} \
-t
}
run_valgrind_stream()
{
${VALGRIND_CMD} --log-file=${TASKCLUSTER_ARTIFACTS}/valgrind_stream.log \
deepspeech \
--model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} \
--scorer ${TASKCLUSTER_TMP_DIR}/kenlm.scorer \
--audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} \
--stream 320 \
-t
}
run_valgrind_extended()
{
${VALGRIND_CMD} --log-file=${TASKCLUSTER_ARTIFACTS}/valgrind_extended.log \
deepspeech \
--model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} \
--scorer ${TASKCLUSTER_TMP_DIR}/kenlm.scorer \
--audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} \
--extended \
-t
}
run_valgrind_extended_stream()
{
${VALGRIND_CMD} --log-file=${TASKCLUSTER_ARTIFACTS}/valgrind_stream_extended.log \
deepspeech \
--model ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} \
--scorer ${TASKCLUSTER_TMP_DIR}/kenlm.scorer \
--audio ${TASKCLUSTER_TMP_DIR}/${ldc93s1_sample_filename} \
--extended_stream 320 \
-t
}