unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Graef Rollins <jrollins@finestructure.net>
To: Mark Walters <markwalters1009@gmail.com>,
	david@tethera.net, notmuch@notmuchmail.org
Cc: David Bremner <bremner@debian.org>
Subject: Re: [PATCH 3/3] test: add broken roundtrip test
Date: Wed, 08 Aug 2012 09:33:30 -0700	[thread overview]
Message-ID: <87k3x9ibs5.fsf@servo.finestructure.net> (raw)
In-Reply-To: <87zk6524f0.fsf@qmul.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

On Wed, Aug 08 2012, Mark Walters <markwalters1009@gmail.com> wrote:
>>  test/dump-restore |    9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/test/dump-restore b/test/dump-restore
>> index 439e998..7979ebf 100755
>> --- a/test/dump-restore
>> +++ b/test/dump-restore
>> @@ -82,4 +82,13 @@ test_begin_subtest "dump outfile -- from:cworth"
>>  notmuch dump dump-outfile-dash-inbox.actual -- from:cworth
>>  test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
>>  
>> +test_expect_success 'roundtripping random message-ids and tags' \
>> +    'test_subtest_known_broken &&
>> +    ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} &&
>> +    notmuch dump > EXPECTED.$test_count &&
>> +    notmuch tag -random-corpus tag:random-corpus &&
>> +    notmuch restore < EXPECTED.$test_count 2>/dev/null &&
>> +    notmuch dump > OUTPUT.$test_count &&
>> +    test_cmp EXPECTED.$test_count OUTPUT.$test_count 1>/dev/null'
>
> Are the single quotes at the start and end of the main block meant to be
> there? And with them deleted this seems to pass (but there is lots of
> diff if the redirection is removed).  I am not familiar with
> test_expect_success/test_cmp so don't know what to expect.

I don't understand what's going on here either.  This seems like a
strange way to run these tests, as a command string to
test_expect_success.  Why not just run them directly?

I'm also worried about the test output blowing away the users terminal.
I think that should be avoided, even if we expect failures to be rare.

jamie.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

      reply	other threads:[~2012-08-08 16:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 18:13 test infrastructure for new dump/restore david
2012-08-05 18:13 ` [PATCH 1/3] test: add database routines for testing david
2012-08-05 18:13 ` [PATCH 2/3] test: add generator for random "stub" messages david
2012-08-08  7:45   ` Mark Walters
2012-08-05 18:13 ` [PATCH 3/3] test: add broken roundtrip test david
2012-08-08  8:06   ` Mark Walters
2012-08-08 16:33     ` Jameson Graef Rollins [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3x9ibs5.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=bremner@debian.org \
    --cc=david@tethera.net \
    --cc=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).