From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#25177: Test failures don't cause some Python packages to fail [was Re: [PATCH 05/11] gnu: Add python-pygit2.] Date: Mon, 12 Dec 2016 00:04:38 +0100 Message-ID: <871sxem5ix.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20161211181237.24485-1-ng0@libertad.pw> <20161211181237.24485-6-ng0@libertad.pw> <20161211223454.GA9474@jasmine> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGDB3-0001C7-RD for bug-guix@gnu.org; Sun, 11 Dec 2016 18:05:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGDB0-00045V-Ik for bug-guix@gnu.org; Sun, 11 Dec 2016 18:05:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGDB0-00044X-CK for bug-guix@gnu.org; Sun, 11 Dec 2016 18:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cGDB0-0003cc-0B for bug-guix@gnu.org; Sun, 11 Dec 2016 18:05:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20161211223454.GA9474@jasmine> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Leo Famulari , 25177@debbugs.gnu.org --=-=-= Content-Type: text/plain Leo Famulari writes: > I noticed while building the package added by ng0's patch (below) that > the test suite fails, but the check phase succeeds: > > [...] > ====================================================================== > ERROR: test_clone_with_credentials (test.test_repository.CloneRepositoryTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/tmp/guix-build-python-pygit2-0.24.2.drv-0/pygit2-0.24.2/test/test_repository.py", line 544, in test_clone_with_credentials > self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2"))) > File "/tmp/guix-build-python-pygit2-0.24.2.drv-0/pygit2-0.24.2/pygit2/__init__.py", line 255, in clone_repository > check_error(err) > File "/tmp/guix-build-python-pygit2-0.24.2.drv-0/pygit2-0.24.2/pygit2/errors.py", line 64, in check_error > raise GitError(message) > _pygit2.GitError: curl error: Couldn't resolve host 'bitbucket.org' > > > ---------------------------------------------------------------------- > Ran 262 tests in 5.771s > > FAILED (errors=3) > phase `check' succeeded after 8.9 seconds > [...] > > Any ideas? It looks like the 'check' phase ends with 'delete-file-recursively', which has an unspecified return value, and that eventual failures from 'call-setuppy' are lost. --8<---------------cut here---------------start------------->8--- (define* (check #:key tests? test-target use-setuptools? #:allow-other-keys) "Run the test suite of a given Python package." (if tests? ;; Running `setup.py test` creates an additional .egg-info directory in ;; build/lib in some cases, e.g. if the source is in a sub-directory ;; (given with `package_dir`). This will by copied to the output, too, ;; so we need to remove. (let ((before (find-files "build" "\\.egg-info$" #:directories? #t))) (call-setuppy test-target '() use-setuptools?) (let* ((after (find-files "build" "\\.egg-info$" #:directories? #t)) (inter (lset-difference eqv? after before))) (for-each delete-file-recursively inter))) #t)) --8<---------------cut here---------------end--------------->8--- Perhaps something like this would work (untested)? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhN24YACgkQoqBt8qM6 VPrSqQgAsiEq/Hff4vegcN7JbMO6+ZkkXzyv2H1aMPa23PSF/iTbtAK4MQIWnTLR hJNk1k2rZjwMptffwXuHt2XNmMRImzFV3JsyIsRcS4e6gtybCoef/Lze4D/jVx2J Qjq/QLbE1nEttNt95xffvNfPMaFwA5F6Mv1i+ChCyvDQQ2igxCJGzTRb7QU8IQLW t/Yya75lOz8ykrGpLZRxniPRexRUky6PduuABSolpzNqBCToPY5DWg4hHeDOJQxj t/r/bqqA5FFKl1aXPIrUHQdtkbrF0S3Ar0i6vatkPo1VhG4PT2G10PHSntfgo3Gw H96YpZ3OB+P211+EpcAdAPOHe8SMGQ== =Xse5 -----END PGP SIGNATURE----- --=-=-=--