File: test-debug

package info (click to toggle)
bashdb 4.0.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,820 kB
  • ctags: 942
  • sloc: sh: 10,581; lisp: 885; makefile: 449; ansic: 325
file content (29 lines) | stat: -rwxr-xr-x 837 bytes parent folder | download
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
#!/bin/bash -f
# -*- shell-script -*-
#$Id: test-debug,v 1.2 2008/08/23 16:56:21 rockyb Exp $

[ -z "$srcdir" ] && export srcdir=$PWD
[ -z "$builddir" ] && export builddir=$PWD
[ -z "$top_builddir" ] && export top_builddir=$builddir/../..

TEST_NAME='debug'

. ${top_builddir}/test/integration/check-common.sh

RIGHT_FILTERED_FILE="/tmp/${TEST_NAME}-filtered.right"
debugged_script="$top_builddir/test/example/debug.sh"

(cd $srcdir && run_debugger $debugged_script 2>&1 >$TEST_FILE </dev/null)

grep -v '##2 main("-q", "-L",' $RIGHT_FILE >${RIGHT_FILTERED_FILE}
grep -v '##2 main("-q", "-L",' $TEST_FILE  >${TEST_FILTERED_FILE}

check_output $TEST_FILTERED_FILE ${RIGHT_FILTERED_FILE}
rc=$? 
if ((0 == rc)) ; then
  rm -f $TEST_FILE
  rm -f $RIGHT_FILTERED_FILE
fi

# Return code tells testing mechanism whether passed or not.
exit $rc