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 C26A1431FAF for ; Sun, 21 Oct 2012 06:15:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 rEwLHeNE2ZTX for ; Sun, 21 Oct 2012 06:15:07 -0700 (PDT) Received: from mail-vb0-f53.google.com (mail-vb0-f53.google.com [209.85.212.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 46479431FAE for ; Sun, 21 Oct 2012 06:15:07 -0700 (PDT) Received: by mail-vb0-f53.google.com with SMTP id fc21so2164188vbb.26 for ; Sun, 21 Oct 2012 06:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=p+z35O3MX1UXm8TishLzhPQe4eUii129TMV9QOi0k9g=; b=gmGAhIP/mOpnjbN13EG7/w8n3YfOJQRUmaiaPZts5LxMM6WMhzRJ0GpXhqd7y99DPE P/VXkCsyBV9fWNeecluASrcuC4HIXLRea1bUajD8Yw8OL95K2XMpMjPl9UOQuA2LoqBQ 3/7g8OZA4qZ0EAqoBKGm0tW+IF3p8SAx/XlN81Ie+WMVyYYdepUvFt68opSPWrGUhmPA M2MN93pU+1YaqjP+6cbLQTXd+0LJ8LQ1OPSeXt6EKBv6b6d0lnR1aMPSbkIufFSbHRsG GOhS5BYhVjKheyjWbml3Z6flCxSrcwNIyKhrcuWSj/NFQ0IxX8wzLR/+v4EnUzNXg1dy i/1A== Received: by 10.58.73.137 with SMTP id l9mr10731510vev.44.1350825306689; Sun, 21 Oct 2012 06:15:06 -0700 (PDT) Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80]) by mx.google.com with ESMTPS id b8sm6843978veq.1.2012.10.21.06.15.05 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 06:15:05 -0700 (PDT) From: Ethan Glasser-Camp To: notmuch@notmuchmail.org Subject: [PATCH] test: new: Fix intermittent test failures with --debug Date: Sun, 21 Oct 2012 09:14:58 -0400 Message-Id: <1350825298-8261-1-git-send-email-ethan@betacantrips.com> X-Mailer: git-send-email 1.7.9.5 Cc: Ethan Glasser-Camp 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: Sun, 21 Oct 2012 13:15:07 -0000 Although messages are created in a particular order, it seems that when they are created on a tmpfs, they do not always come back in the same order, leading to the same files being ignored but being output in a different order. This causes the test to fail because the outputs being compared are the same. Fix the failures by sorting the output of notmuch --debug and comparing this to a hand-sorted version of its output. Signed-off-by: Ethan Glasser-Camp --- test/new | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/new b/test/new index cc2af72..587aa11 100755 --- a/test/new +++ b/test/new @@ -189,17 +189,17 @@ touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan. mkdir -p "${MAIL_DIR}"/one/two/three/.git notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order. touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file -output=$(NOTMUCH_NEW --debug 2>&1) +output=$(NOTMUCH_NEW --debug 2>&1 | sort) test_expect_equal "$output" \ "(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/.git (D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/.git -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/.git -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file -(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/ignored_file (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.git (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file (D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/.git +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file No new mail." -- 1.7.9.5