~ubuntu-branches/debian/sid/glib2.0/sid

« back to all changes in this revision

Viewing changes to tests/run-assert-msg-test.sh

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 06:25:57 UTC
  • mfrom: (1.27.14) (3.1.181 experimental)
  • Revision ID: package-import@ubuntu.com-20130508062557-i7gbku66mls70gi2
Tags: 2.36.1-2
Merge experimental branch, upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  error_out=/dev/stderr
20
20
fi  
21
21
 
 
22
if [ -z "$LIBTOOL" ]; then
 
23
  if [ -f ../libtool ]; then
 
24
    LIBTOOL=../libtool
 
25
  else
 
26
    LIBTOOL=libtool
 
27
  fi
 
28
fi
 
29
 
22
30
echo_v "Running assert-msg-test"
23
31
OUT=$(./assert-msg-test 2>&1) && fail "assert-msg-test should abort"
24
32
echo "$OUT" | grep -q '^ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)' || \
29
37
  exit 0
30
38
fi
31
39
 
32
 
msg_test="assert-msg-test"
33
 
if [ -e ".libs/lt-$msg_test" ]; then
34
 
       msg_test="lt-$msg_test"
35
 
fi
36
40
echo_v "Running gdb on assert-msg-test"
37
 
OUT=$(libtool --mode=execute gdb --batch --ex run --ex "set print elements 0" --ex "print (char*) __glib_assert_msg" .libs/$msg_test 2> $error_out) || \
38
 
  fail "failed to run gdb"
 
41
OUT=$($LIBTOOL --mode=execute gdb --batch -x ${srcdir:-.}/assert-msg-test.gdb ./assert-msg-test 2> $error_out) || fail "failed to run gdb"
39
42
 
40
43
echo_v "Checking if assert message is in __glib_assert_msg"
41
44
if ! echo "$OUT" | grep -q '^$1.*"ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)"'; then