From: Matthias Clasen Date: Mon, 14 Jan 2013 22:21:52 +0000 (-0500) Subject: Fix the assert-msg test X-Git-Tag: 2.35.4~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1c25d3191214ce6cd289f0756e6027c35cc2075;p=platform%2Fupstream%2Fglib.git Fix the assert-msg test gdb is playing games with us, by breaking -x /dev/stdin --- diff --git a/tests/assert-msg-test.gdb b/tests/assert-msg-test.gdb new file mode 100644 index 0000000..a22981a --- /dev/null +++ b/tests/assert-msg-test.gdb @@ -0,0 +1,3 @@ +run +set print elements 0 +print (char*) __glib_assert_msg diff --git a/tests/run-assert-msg-test.sh b/tests/run-assert-msg-test.sh index 338a14f..5f73d01 100755 --- a/tests/run-assert-msg-test.sh +++ b/tests/run-assert-msg-test.sh @@ -38,10 +38,11 @@ if ! type gdb >/dev/null 2>&1; then fi echo_v "Running gdb on assert-msg-test" -OUT=$((echo run; echo "set print elements 0"; echo "print (char*) __glib_assert_msg") | $LIBTOOL --mode=execute gdb --batch -x /dev/stdin assert-msg-test 2> $error_out) || fail "failed to run gdb" +OUT=$($LIBTOOL --mode=execute gdb --batch -x assert-msg-test.gdb assert-msg-test 2> $error_out) || fail "failed to run gdb" echo_v "Checking if assert message is in __glib_assert_msg" if ! echo "$OUT" | grep -q '^$1.*"ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)"'; then + echo "got: $OUT" fail "__glib_assert_msg does not have assertion message" fi