mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 06:32:10 +01:00
Fix the assert-msg test
gdb is playing games with us, by breaking -x /dev/stdin
This commit is contained in:
parent
ba4a3849c6
commit
d1c25d3191
3
tests/assert-msg-test.gdb
Normal file
3
tests/assert-msg-test.gdb
Normal file
@ -0,0 +1,3 @@
|
||||
run
|
||||
set print elements 0
|
||||
print (char*) __glib_assert_msg
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user