From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E6571431FBD for ; Fri, 1 Nov 2013 17:02:19 -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 EgXnCqfeTXpN for ; Fri, 1 Nov 2013 17:02:15 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D59DD431FAF for ; Fri, 1 Nov 2013 17:02:15 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1VcOfN-0002Oj-Ba; Fri, 01 Nov 2013 21:02:13 -0300 Received: (nullmailer pid 24363 invoked by uid 1000); Sat, 02 Nov 2013 00:02:05 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] test: fix compact backup / restore test Date: Fri, 1 Nov 2013 21:01:55 -0300 Message-Id: <1383350515-24320-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.8.4.rc3 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 00:02:20 -0000 It was looking in completely the wrong place for the backup and the (test) xapian database. Unfortunately test_begin_subtest hides the relevant errors. --- 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