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 3A84A6DE0C3B for ; Tue, 5 Nov 2019 18:19:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.06 X-Spam-Level: X-Spam-Status: No, score=-0.06 tagged_above=-999 required=5 tests=[AWL=-0.059, SPF_PASS=-0.001] 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 orZohwUtaFPd for ; Tue, 5 Nov 2019 18:19:42 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 3DCC26DE01CE for ; Tue, 5 Nov 2019 18:19:42 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1iSAv2-0005U6-DY; Tue, 05 Nov 2019 21:19:36 -0500 Received: (nullmailer pid 1510 invoked by uid 1000); Wed, 06 Nov 2019 02:19:35 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 4/5] tests: run python-cffi tests In-Reply-To: References: <20191104013927.17037-1-david@tethera.net> <20191104013927.17037-5-david@tethera.net> Date: Tue, 05 Nov 2019 22:19:35 -0400 Message-ID: <87h83hsq4o.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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, 06 Nov 2019 02:19:44 -0000 Tomi Ollila writes: > > probably > > test_expect_success "${NOTMUCH_PYTHON} -m pytest \ > --log-file=$TMP_DIRECTORY/test.output \ > $NOTMUCH_SRCDIR/bindings/python-cffi/build/stage" > > worked (which reminds me out-of-tree... ;) > despite looking prettier this does not work because it looks for the "notdb" module in the current directory. It could work (maybe) if we set PYTHONPATH. Would that be better than the 'cd'? > as for checking pytest existence, the following works somewhat: > > ~/test-venv/bin/python3 -m pytest --version > > It prints the version, then exists. Could not figure out how to request > specific version in quick look (10 min search/trial/error session), > parsing version output is so... :/ I think something like conf=$(mktemp) printf "[pytest]\nminversion=3.0\n" > $conf if pytest-3 -c $conf --version >/dev/null; then have_pytest=1 else have_pytest=0 fi rm -f $(conf) should work.