From: Tomi Ollila Date: Sat, 2 Nov 2013 13:25:57 +0000 (+0200) Subject: Re: [PATCH] test: fix compact backup / restore test X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1454d89cc3b50e130699c8f49a71703a78ede7dc;p=notmuch-archives.git Re: [PATCH] test: fix compact backup / restore test --- diff --git a/c0/0663d596afb2f26c3df8dfe6b806eabbeb7381 b/c0/0663d596afb2f26c3df8dfe6b806eabbeb7381 new file mode 100644 index 000000000..07df58761 --- /dev/null +++ b/c0/0663d596afb2f26c3df8dfe6b806eabbeb7381 @@ -0,0 +1,98 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id B8297431FC9 + for ; Sat, 2 Nov 2013 06:26:10 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id YSVHDyHGAW4B for ; + Sat, 2 Nov 2013 06:26:05 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 4FDAE431FDB + for ; Sat, 2 Nov 2013 06:26:04 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 9CD8510005D; + Sat, 2 Nov 2013 15:25:57 +0200 (EET) +From: Tomi Ollila +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH] test: fix compact backup / restore test +In-Reply-To: <1383350515-24320-1-git-send-email-david@tethera.net> +References: <1383350515-24320-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.16+119~g219c55f (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 02 Nov 2013 13:26:12 -0000 + +On Sat, Nov 02 2013, David Bremner wrote: + +> It was looking in completely the wrong place for the backup and the +> (test) xapian database. Unfortunately test_begin_subtest hides the +> relevant errors. +> --- + +LGTM. It took me a while noticing that also ${TEST_TMPDIR} +was changed to ${MAIL_DIR} + +Tomi + +> +> I found this bug because +> +> id:9ee3f2334a117b0a1b88650f44432423cbe95fd7.1383315568.git.jani@nikula.org +> +> did _not_ break any tests. Which was puzzling. +> +> test/compact | 7 ++++--- +> 1 file changed, 4 insertions(+), 3 deletions(-) +> +> diff --git a/test/compact b/test/compact +> index 5bb5cea..afab537 100755 +> --- a/test/compact +> +++ b/test/compact +> @@ -19,10 +19,11 @@ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread) +> thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread) +> thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)" +> +> -test_begin_subtest "Restoring backup" +> -rm -Rf ${TEST_TMPDIR}/mail/xapian +> -mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian +> +test_expect_success 'Restoring Backup' \ +> + 'rm -Rf ${MAIL_DIR}/.notmuch/xapian && +> + mv ${MAIL_DIR}/xapian.old ${MAIL_DIR}/.notmuch/xapian' +> +> +test_begin_subtest "Checking restored backup" +> output=$(notmuch search \* | notmuch_search_sanitize) +> test_expect_equal "$output" "\ +> thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread) +> -- +> 1.8.4.rc3 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch