]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
test: make gdb even quieter
authorDavid Bremner <david@tethera.net>
Tue, 28 Jun 2016 21:08:54 +0000 (23:08 +0200)
committerDavid Bremner <david@tethera.net>
Sun, 14 Aug 2016 04:27:57 +0000 (13:27 +0900)
gdb sometimes writes warnings to stdout, which we don't need/want, and
for some reason --batch-silent isn't enough to hide. So in this commit
we write them to a log file, which is probably better for debugging
anyway. To see an illustrative test failure before this change, run

% make
% touch notmuch-count.c
% cd test && ./T060-count.sh

(cherry picked from commit f45fa5bdd397d52473f7092f7ae3e2ffb9b7aee5)

test/T060-count.sh
test/T070-insert.sh

index 0ac8314087cd9c985f97b79170a50d37d5657c72..d6933a7689712fed3ea97fb819d075597d550b57 100755 (executable)
@@ -103,6 +103,8 @@ restore_database
 
 cat <<EOF > count-files.gdb
 set breakpoint pending on
+set logging file count-files-gdb.log
+set logging on
 break count_files
 commands
 shell cp /dev/null ${MAIL_DIR}/.notmuch/xapian/postlist.${db_ending}
index e7ec6a6cc579d7d2b812e7e19dfb5851b3e25ae8..c2485bb2c2bd71bf0e1a51db5b9f833d03e018c6 100755 (executable)
@@ -192,6 +192,8 @@ for code in OUT_OF_MEMORY XAPIAN_EXCEPTION FILE_NOT_EMAIL \
 gen_insert_msg
 cat <<EOF > index-file-$code.gdb
 set breakpoint pending on
+set logging file index-file-$code.log
+set logging on
 break notmuch_database_add_message
 commands
 return NOTMUCH_STATUS_$code