unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* T070 tests portability
@ 2016-01-05 10:55 J Farkas
  2016-01-05 20:58 ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: J Farkas @ 2016-01-05 10:55 UTC (permalink / raw)
  To: notmuch

I'm in the process of writing insert tests, but it looks like my
environment is somewhat older than what the current tests are running
on.  The following two trivial changes for the original tests make those
pass cleanly:

The wc I have from GNU textutils 2.0.22 seems to produce extra
whitespace that needs to be cleaned:

diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index e7ec6a6..5864b9b 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -62,3 +62,3 @@ test_begin_subtest "Insert duplicate message"
 notmuch insert +duptag -unread < "$gen_msg_filename"
-output=$(notmuch search --output=files "subject:insert-subject" | wc -l)
+output=$(notmuch search --output=files "subject:insert-subject" | echo $(wc -l))
 test_expect_equal "$output" 2

And without the following cast, gdb 7.4 complains about the return type.

    index-file-XAPIAN_EXCEPTION.gdb:7: Error in sourced command file:
    Return value type not available for selected stack frame.
    Please use an explicit cast of the value to return.

diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index e7ec6a6..5864b9b 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -196,3 +196,3 @@ break notmuch_database_add_message
 commands
-return NOTMUCH_STATUS_$code
+return (int)NOTMUCH_STATUS_$code
 continue

Does any of the above look reasonable to reduce the false positives?
With the above, the T070 tests all pass on my system.

Janos

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-08 19:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05 10:55 T070 tests portability J Farkas
2016-01-05 20:58 ` Tomi Ollila
2016-01-05 21:41   ` David Bremner
2016-01-06 13:51     ` J Farkas
2016-01-07 21:50       ` Tomi Ollila
2016-01-08 19:23         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).