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 39235429E2E for ; Thu, 2 Jun 2011 05:04:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 zesHKN+OpXIQ for ; Thu, 2 Jun 2011 05:04:24 -0700 (PDT) Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B92D1429E27 for ; Thu, 2 Jun 2011 05:04:21 -0700 (PDT) Received: by wwi18 with SMTP id 18so4282671wwi.2 for ; Thu, 02 Jun 2011 05:04:20 -0700 (PDT) Received: by 10.227.159.136 with SMTP id j8mr644753wbx.99.1307016260334; Thu, 02 Jun 2011 05:04:20 -0700 (PDT) Received: from localhost ([109.131.21.86]) by mx.google.com with ESMTPS id o19sm354015wbh.4.2011.06.02.05.04.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2011 05:04:19 -0700 (PDT) From: Pieter Praet To: Notmuch Mail Subject: [PATCH 2/4] test: add 'Emacs' prereq to dependent 'crypto' tests Date: Thu, 2 Jun 2011 14:03:38 +0200 Message-Id: <1307016220-17509-3-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1307016220-17509-1-git-send-email-pieter@praet.org> References: <1307016220-17509-1-git-send-email-pieter@praet.org> Cc: Austin Clements 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: Thu, 02 Jun 2011 12:04:25 -0000 Adds a new test that checks for the presence of 'emacs', and adds that test as a prereq to all subsequent tests that rely on Emacs. This causes tests with unmet dependencies to be skipped. Signed-off-by: Pieter Praet --- test/crypto | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/test/crypto b/test/crypto index 59f7989..c69307d 100755 --- a/test/crypto +++ b/test/crypto @@ -7,10 +7,21 @@ test_description='PGP/MIME signature verification and decryption' . ./test-lib.sh +# Emacs is a prereq. +test_expect_success "prereq: Emacs is present" "which emacs" \ + && test_set_prereq EMACS + # GnuPG is a prereq. test_expect_success "prereq: GnuPG is present" "which gpg" \ && test_set_prereq GPG +# Some tests have multiple prereqs, but the test_expect_* functions +# accept only a single argument as prereq tag, and using test_have_prereq +# in and around tests causes various errors for me, so a dirty workaround +# will have to do for the time being. +test_have_prereq EMACS && test_have_prereq GPG \ + && test_set_prereq EMACS+GPG + add_gnupg_home () { @@ -36,7 +47,7 @@ FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep # although I can't figure out why add_email_corpus -test_expect_success GPG 'emacs delivery of signed message' \ +test_expect_success EMACS+GPG 'emacs delivery of signed message' \ 'emacs_deliver_message \ "test signed message 001" \ "This is a test signed message." \ @@ -146,7 +157,7 @@ mv "${GNUPGHOME}"{.bak,} cat <TESTATTACHMENT This is a test file. EOF -test_expect_success GPG 'emacs delivery of encrypted message with attachment' \ +test_expect_success EMACS+GPG 'emacs delivery of encrypted message with attachment' \ 'emacs_deliver_message \ "test encrypted message 001" \ "This is a test encrypted message.\n" \ @@ -269,7 +280,7 @@ test_expect_equal GPG \ "$expected" mv "${GNUPGHOME}"{.bak,} -test_expect_success GPG 'emacs delivery of encrypted + signed message' \ +test_expect_success EMACS+GPG 'emacs delivery of encrypted + signed message' \ 'emacs_deliver_message \ "test encrypted message 002" \ "This is another test encrypted message.\n" \ -- 1.7.4.1