[PATCH v2 01/11] test: fix compact backup / restore test
authorJani Nikula <jani@nikula.org>
Sun, 3 Nov 2013 12:24:41 +0000 (14:24 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:57:57 +0000 (09:57 -0800)
f9/95de613342fdbc5a1ab83bac105efc2342142e [new file with mode: 0644]

diff --git a/f9/95de613342fdbc5a1ab83bac105efc2342142e b/f9/95de613342fdbc5a1ab83bac105efc2342142e
new file mode 100644 (file)
index 0000000..53cbd7c
--- /dev/null
@@ -0,0 +1,100 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 57B0E431FDB\r
+       for <notmuch@notmuchmail.org>; Sun,  3 Nov 2013 04:25:06 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 55azqNHXLKqj for <notmuch@notmuchmail.org>;\r
+       Sun,  3 Nov 2013 04:24:58 -0800 (PST)\r
+Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com\r
+       [209.85.215.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 06449431FBF\r
+       for <notmuch@notmuchmail.org>; Sun,  3 Nov 2013 04:24:57 -0800 (PST)\r
+Received: by mail-ea0-f182.google.com with SMTP id o10so2860479eaj.41\r
+       for <notmuch@notmuchmail.org>; Sun, 03 Nov 2013 04:24:56 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+       :references:in-reply-to:references;\r
+       bh=M8hdHdm5wZHwMa4yo5WrS+f65b/rngIY0VvDfg9gaU0=;\r
+       b=f2uQ77lBwUXwwjUeV26ykaH+374lzSsfkxSY7UorW2Qeq00MqP5H0xgFV02vQrXROy\r
+       12grG4yUJh/czdIsxenIkihy3c8uCCVGdejxOhMkGniQvfHCS7b4Eh+LHL7zWJpmtZZR\r
+       bVu8r7jKgYYqnTp/pmiyQF0C/eWAy2oPP6U5eJXtk+YISEATy+pEyfySVimwMK2xp3Cr\r
+       vlm2Mcy63P4MTMMF4j+Znsddyjam2iMhKQk9TQXHG2wBmH7Wx3iaNx3GVu/BSBykOyjf\r
+       pUxXYtG0FK8ZvbSdA2cTpyz9lXiIG7/V0LiLdc/2Xf6Fs/l3KJwCoDKni9dPBRs/Z13r\r
+       qhTg==\r
+X-Gm-Message-State:\r
+ ALoCoQlRD8siigFU1BNUxlaUvBArSxVa/gg1e2YgskroU/9lyH1vmnpuVIavj/IjvrzNjk4vegBL\r
+X-Received: by 10.14.48.14 with SMTP id u14mr145382eeb.74.1383481496822;\r
+       Sun, 03 Nov 2013 04:24:56 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91]) by mx.google.com with ESMTPSA id\r
+       x47sm32772966eea.16.2013.11.03.04.24.55 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 03 Nov 2013 04:24:56 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 01/11] test: fix compact backup / restore test\r
+Date: Sun,  3 Nov 2013 14:24:41 +0200\r
+Message-Id:\r
+ <877a8e845940b35ab0ec226b8e0915ed56275611.1383481295.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.8.4.rc3\r
+In-Reply-To: <cover.1383481295.git.jani@nikula.org>\r
+References: <cover.1383481295.git.jani@nikula.org>\r
+In-Reply-To: <cover.1383481295.git.jani@nikula.org>\r
+References: <cover.1383481295.git.jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 03 Nov 2013 12:25:06 -0000\r
+\r
+From: David Bremner <david@tethera.net>\r
+\r
+It was looking in completely the wrong place for the backup and the\r
+(test) xapian database. Unfortunately test_begin_subtest hides the\r
+relevant errors.\r
+---\r
+ test/compact | 7 ++++---\r
+ 1 file changed, 4 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/compact b/test/compact\r
+index 5bb5cea..afab537 100755\r
+--- a/test/compact\r
++++ b/test/compact\r
+@@ -19,10 +19,11 @@ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)\r
+ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)\r
+ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"\r
\r
+-test_begin_subtest "Restoring backup"\r
+-rm -Rf ${TEST_TMPDIR}/mail/xapian\r
+-mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian\r
++test_expect_success 'Restoring Backup' \\r
++    'rm -Rf ${MAIL_DIR}/.notmuch/xapian &&\r
++     mv ${MAIL_DIR}/xapian.old ${MAIL_DIR}/.notmuch/xapian'\r
\r
++test_begin_subtest "Checking restored backup"\r
+ output=$(notmuch search \* | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "\\r
+ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)\r
+-- \r
+1.8.4.rc3\r
+\r