[glib] Do not fail unit test due to gdb abbreviating strings
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Do not fail unit test due to gdb abbreviating strings
- Date: Fri, 17 Feb 2012 17:00:16 +0000 (UTC)
commit 50efbaf063f77f4e273f87ebf4ab01a1c507e97f
Author: Peter Kjellerstedt <pkj axis com>
Date: Thu Feb 16 12:17:32 2012 +0100
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 <pkj axis com>
https://bugzilla.gnome.org/show_bug.cgi?id=670218
tests/run-assert-msg-test.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/run-assert-msg-test.sh b/tests/run-assert-msg-test.sh
index ee20149..194481e 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]