From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id F1A946DE2A80 for ; Sun, 25 Mar 2018 11:22:10 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uOHt_Ne2MOvK for ; Sun, 25 Mar 2018 11:22:10 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 68DA86DE1801 for ; Sun, 25 Mar 2018 11:22:09 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1f09dQ-00056m-Aw; Sun, 25 Mar 2018 13:40:48 -0400 Received: (nullmailer pid 18093 invoked by uid 1000); Sun, 25 Mar 2018 17:40:47 -0000 From: David Bremner To: Justus Winter , Floris Bruynooghe , David Bremner , "W. Trevor King" Cc: notmuch@notmuchmail.org Subject: [PATCH 1/3] configure: check for pytest binary Date: Sun, 25 Mar 2018 14:40:32 -0300 Message-Id: <20180325174034.17912-2-david@tethera.net> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180325174034.17912-1-david@tethera.net> References: <87po3x4tuc.fsf@thinkbox.jade-hamburg.de> <20180325174034.17912-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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, 25 Mar 2018 18:22:11 -0000 This is to support future use of pytest in the test suite --- configure | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/configure b/configure index b177b141..ab45878d 100755 --- a/configure +++ b/configure @@ -62,6 +62,7 @@ CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} LDFLAGS=${LDFLAGS:-} XAPIAN_CONFIG=${XAPIAN_CONFIG:-} PYTHON=${PYTHON:-} +PYTEST=${PYTEST:-} # We don't allow the EMACS or GZIP Makefile variables inherit values # from the environment as we do with CC and CXX above. The reason is @@ -118,6 +119,8 @@ Other environment variables can be used to control configure itself, library. [$XAPIAN_CONFIG] PYTHON Name of python command to use in configure and the test suite. + PYTEST Name of pytest command to use in + the test suite. Additionally, various options can be specified on the configure command line. @@ -571,6 +574,24 @@ if [ $have_python -eq 0 ]; then errors=$((errors + 1)) fi +pytest="" +if [ $have_python -eq 1 ]; then + printf "Checking for pytest... " + have_pytest=0 + + for name in ${PYTEST} pytest-3 pytest pytest-2; do + if command -v $name > /dev/null; then + have_pytest=1 + pytest=$name + printf "Yes (%s).\n" $pytest + break + fi + done + if [ $have_pytest -eq 0 ]; then + printf "No (some tests may be skipped).\n" + fi +fi + printf "Checking for valgrind development files... " if pkg-config --exists valgrind; then printf "Yes.\n" @@ -1234,6 +1255,9 @@ NOTMUCH_HAVE_MAN=$((have_sphinx)) # Name of python interpreter NOTMUCH_PYTHON=${python} +# Name of pytest runner +NOTMUCH_PYTEST=${pytest} + # Are the ruby development files (and ruby) available? If not skip # building/testing ruby bindings. NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev} -- 2.16.2