File: debug

package info (click to toggle)
sphinxbase 0.8%2B5prealpha%2B1-16
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,720 kB
  • sloc: ansic: 28,813; sh: 11,875; makefile: 705; python: 338; perl: 127; yacc: 93; lex: 50
file content (57 lines) | stat: -rw-r--r-- 1,697 bytes parent folder | download | duplicates (2)
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
---
 test/regression/test-sphinx_fe-ctl.sh |   20 ++++++++++++++++++++
 test/regression/testfuncs.sh.in       |   12 ++++++++++++
 2 files changed, 32 insertions(+)

--- a/test/regression/test-sphinx_fe-ctl.sh
+++ b/test/regression/test-sphinx_fe-ctl.sh
@@ -57,8 +57,28 @@ run_program sphinx_cepview/sphinx_cepvie
 -f chan3.wav.mfc \
 > test-sphinx_fe.cepview 2>>$tmpout
 
+[ -x /usr/bin/strace ] &&
+strace_program sphinx_cepview/sphinx_cepview \
+-i 13 \
+-d 13 \
+-f chan3.wav.mfc \
+> test-sphinx_fe.strace.cepview 2>>$tmpout
+
+[ -x /usr/bin/ltrace ] &&
+ltrace_program sphinx_cepview/sphinx_cepview \
+-i 13 \
+-d 13 \
+-f chan3.wav.mfc \
+> test-sphinx_fe.ltrace.cepview 2>>$tmpout
+
 compare_table "WAVE2FEAT test" test-sphinx_fe.cepview $tests/regression/chan3.cepview 0.1
+[ -r test-sphinx_fe.strace.cepview ] &&
+compare_table "WAVE2FEAT test" test-sphinx_fe.strace.cepview $tests/regression/chan3.cepview 0.1
+[ -r test-sphinx_fe.ltrace.cepview ] &&
+compare_table "WAVE2FEAT test" test-sphinx_fe.ltrace.cepview $tests/regression/chan3.cepview 0.1
 
 if test x"$failures" != x; then
+  cat strace 1>&2
+  cat ltrace 1>&2
   cat $tmpout 1>&2
 fi
--- a/test/regression/testfuncs.sh.in
+++ b/test/regression/testfuncs.sh.in
@@ -28,6 +28,18 @@ memcheck_program() {
     $builddir/libtool --mode=execute valgrind --leak-check=full "$builddir/src/$program" $@
 }
 
+strace_program() {
+    program="$1"
+    shift
+    $builddir/libtool --mode=execute strace -o strace "$builddir/src/$program" $@
+}
+
+ltrace_program() {
+    program="$1"
+    shift
+    $builddir/libtool --mode=execute ltrace -o ltrace "$builddir/src/$program" $@
+}
+
 pass() {
     title="$1"
     echo "$title PASSED"