From 149a7d0a4d584502030eebcf67a4a3e22e99d58d Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Thu, 16 Feb 2012 12:17:32 +0100 Subject: [PATCH] Do not fail unit test due to gdb abbreviating strings gdb by default will only print strings up to 200 characters. After that it abbreviates them. This affects the run-assert-msg-test.sh script if the path to the glib installation is too long (in our case it was 133 characters, 132 would still have worked...) By having gdb execute "set print elements 0" before printing the assert string, the limit on maximum number of characters to print is set to unlimited. Signed-off-by: Peter Kjellerstedt https://bugzilla.gnome.org/show_bug.cgi?id=670218 --- tests/run-assert-msg-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-assert-msg-test.sh b/tests/run-assert-msg-test.sh index 8557e020f..2b93cc6f0 100755 --- a/tests/run-assert-msg-test.sh +++ b/tests/run-assert-msg-test.sh @@ -34,7 +34,7 @@ if [ -e ".libs/lt-$msg_test" ]; then msg_test="lt-$msg_test" fi echo_v "Running gdb on assert-msg-test" -OUT=$(gdb --batch --ex run --ex "print (char*) __glib_assert_msg" .libs/$msg_test 2> $error_out) || \ +OUT=$(gdb --batch --ex run --ex "set print elements 0" --ex "print (char*) __glib_assert_msg" .libs/$msg_test 2> $error_out) || \ fail "failed to run gdb" echo_v "Checking if assert message is in __glib_assert_msg"