From dcf39ab22b39515dc04dafc4c2286491aa17dc66 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Wed, 26 Mar 2014 21:56:37 +0000 Subject: [PATCH] Re: [PATCH] test: conditionally test help system depending on configured support --- f7/720811246044b71cba59a75d88567291a5c531 | 141 ++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 f7/720811246044b71cba59a75d88567291a5c531 diff --git a/f7/720811246044b71cba59a75d88567291a5c531 b/f7/720811246044b71cba59a75d88567291a5c531 new file mode 100644 index 000000000..03e7c78a2 --- /dev/null +++ b/f7/720811246044b71cba59a75d88567291a5c531 @@ -0,0 +1,141 @@ +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 06F9F431FAF + for ; Wed, 26 Mar 2014 14:56:56 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -1.098 +X-Spam-Level: +X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 hOXe9M0y8WiX for ; + Wed, 26 Mar 2014 14:56:47 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id A0F84431FBD + for ; Wed, 26 Mar 2014 14:56:47 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1WSvoN-0004oX-6R; Wed, 26 Mar 2014 21:56:42 +0000 +Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1WSvoM-0007uq-PX; Wed, 26 Mar 2014 21:56:38 +0000 +From: Mark Walters +To: Jani Nikula , notmuch@notmuchmail.org, david@tethera.net +Subject: Re: [PATCH] test: conditionally test help system depending on + configured support +In-Reply-To: <1395823692-30311-1-git-send-email-jani@nikula.org> +References: <1395823692-30311-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Wed, 26 Mar 2014 21:56:37 +0000 +Message-ID: <877g7gipyi.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 93.97.24.31 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: 1c5067b45e72ed68f127cc7151fb6e4e (of first 20000 bytes) +X-SpamAssassin-Score: 0.0 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored 0.0 points. Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * 0.0 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +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: Wed, 26 Mar 2014 21:56:56 -0000 + + +LGTM +1 (and tests pass on one of my systems that does not have sphinx +or rst2man) + +Best wishes + +Mark + +On Wed, 26 Mar 2014, Jani Nikula wrote: +> If neither sphinx nor rst2man is available, the notmuch man pages will +> not be available. Take this into account in the help system test. +> --- +> test/Makefile.local | 8 ++++++++ +> test/T010-help-test.sh | 12 ++++++++++-- +> 2 files changed, 18 insertions(+), 2 deletions(-) +> +> diff --git a/test/Makefile.local b/test/Makefile.local +> index 2b18bdb..987441f 100644 +> --- a/test/Makefile.local +> +++ b/test/Makefile.local +> @@ -42,10 +42,18 @@ else +> ln -sf /bin/false $@ +> endif +> +> +$(dir)/have-man: Makefile.config +> +ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00) +> + ln -sf /bin/false $@ +> +else +> + ln -sf /bin/true $@ +> +endif +> + +> .PHONY: test check +> +> TEST_BINARIES=$(dir)/arg-test \ +> $(dir)/have-compact \ +> + $(dir)/have-man \ +> $(dir)/hex-xcode \ +> $(dir)/random-corpus \ +> $(dir)/parse-time \ +> diff --git a/test/T010-help-test.sh b/test/T010-help-test.sh +> index f7df725..77410bc 100755 +> --- a/test/T010-help-test.sh +> +++ b/test/T010-help-test.sh +> @@ -4,9 +4,17 @@ test_description="online help" +> . ./test-lib.sh +> +> test_expect_success 'notmuch --help' 'notmuch --help' +> -test_expect_success 'notmuch --help tag' 'notmuch --help tag' +> test_expect_success 'notmuch help' 'notmuch help' +> -test_expect_success 'notmuch help tag' 'notmuch help tag' +> test_expect_success 'notmuch --version' 'notmuch --version' +> +> +if ${TEST_DIRECTORY}/have-man; then +> + test_expect_success 'notmuch --help tag' 'notmuch --help tag' +> + test_expect_success 'notmuch help tag' 'notmuch help tag' +> +else +> + test_expect_success 'notmuch --help tag (man pages not available)' \ +> + 'test_must_fail notmuch --help tag' +> + test_expect_success 'notmuch help tag (man pages not available)' \ +> + 'test_must_fail notmuch help tag' +> +fi +> + +> test_done +> -- +> 1.7.2.5 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2