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 9E402429E45 for ; Sat, 14 Jan 2012 01:11:30 -0800 (PST) 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 uYMf27vBTEdi for ; Sat, 14 Jan 2012 01:11:30 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 07E0D431FB6 for ; Sat, 14 Jan 2012 01:11:29 -0800 (PST) Received: by wibhr12 with SMTP id hr12so1047234wib.26 for ; Sat, 14 Jan 2012 01:11:28 -0800 (PST) Received: by 10.180.77.35 with SMTP id p3mr7337271wiw.11.1326532288765; Sat, 14 Jan 2012 01:11:28 -0800 (PST) Received: from localhost ([109.131.75.86]) by mx.google.com with ESMTPS id fi6sm20855900wib.2.2012.01.14.01.11.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Jan 2012 01:11:28 -0800 (PST) From: Pieter Praet To: Dmitry Kurochkin Subject: [PATCH] test: don't bail out of `run_emacs' too early when missing prereqs Date: Sat, 14 Jan 2012 10:09:37 +0100 Message-Id: <1326532177-19167-1-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.8.1 In-Reply-To: <87mx9qps82.fsf@praet.org> References: <87mx9qps82.fsf@praet.org> Cc: Notmuch Mail 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, 14 Jan 2012 09:11:30 -0000 When running the Emacs tests in verbose mode, only the first missing prereq is reported because the `run_emacs' function is short-circuited early: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] emacs(1) skipping test: [0] Basic notmuch-hello view in emacs SKIP [0] Basic notmuch-hello view in emacs #+end_example This can lead to situations reminiscent of "dependency hell", so instead of returning based on each individual `test_require_external_prereq's exit status, we now do so only after checking all the prereqs: #+begin_example emacs: Testing emacs interface missing prerequisites: [0] dtach(1) emacs(1) emacsclient(1) skipping test: [0] Basic notmuch-hello view in emacs SKIP [0] Basic notmuch-hello view in emacs #+end_example Also added missing prereq for dtach(1). --- test/test-lib.sh | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 82767c0..d1fbc05 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -907,8 +907,11 @@ EOF test_emacs () { # test dependencies beforehand to avoid the waiting loop below - test_require_external_prereq emacs || return - test_require_external_prereq emacsclient || return + missing_dependencies= + test_require_external_prereq dtach || missing_dependencies=1 + test_require_external_prereq emacs || missing_dependencies=1 + test_require_external_prereq emacsclient || missing_dependencies=1 + test -z "$missing_dependencies" || return if [ -z "$EMACS_SERVER" ]; then server_name="notmuch-test-suite-$$" -- 1.7.8.1