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 08:54:40 +0100 Message-ID: <87mvg1k2f3.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> <871sxem5ix.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGLRy-0001mq-Hg for bug-guix@gnu.org; Mon, 12 Dec 2016 02:55:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGLRu-0008FM-2l for bug-guix@gnu.org; Mon, 12 Dec 2016 02:55:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGLRt-0008FG-Ua for bug-guix@gnu.org; Mon, 12 Dec 2016 02:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cGLRt-0004Hq-No for bug-guix@gnu.org; Mon, 12 Dec 2016 02:55:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871sxem5ix.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> 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: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Marius Bakke writes: > 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. The good news: the attached patch makes 'check' work as expected. The bad news is that we have some breakages. 'python-py' fails with: TypeError: py.test.__dict__ is not a dictionary Which seems similar to https://github.com/NixOS/nixpkgs/issues/12565#issuecomment-174165144 I tried adding a newer setuptools as input, to no avail. Needs more investigation. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhOV8AACgkQoqBt8qM6 VPo6lQf8Del46XlF6H98GvOR9TBsOPyLFemYqh+PMIA0xrBdAlc+W8Zedpnkl/JK +wS9lb74UBK0TQmFyZCqAs1mYEV1uC/59sOKflLTLoS0f2pRl9BMUUec5GS0yZ5m BxtXUiDmZ5fOh+JyJpbDddOcahkm/CYVdb2mbFSAaAt1cNFKWKeWqFhZW/7lIWOR IPybMsAAMVF82CmvXy7eHI4D3xl07M6o8idqUYJxaA1VyeKj4WlKvojS378wwEEk 2E7ln48Q+N10GTpFNSBEPzHa/TXoE4nykuool8/vHik1gExXA9cfabTudm4WqZET ozrkecKgvzVrBIomULvZ8VxeM21Gjg== =2BVA -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-build-system-python-Make-sure-check-returns-failures.patch >From 12c4a14b415f26155f85f8ea172ddf696e274855 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 12 Dec 2016 00:25:27 +0100 Subject: [PATCH] build-system/python: Make sure 'check' returns failures. * guix/build/python-build-system.scm (check): Wrap 'call-setuppy' in 'if' so that it actually fails when the tests fail. Print informational message when skipped. --- guix/build/python-build-system.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index 3f280b0ac..dd07986b9 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -137,11 +137,15 @@ ;; (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)) + (if (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) + #f)) + (begin + (format #t "test suite not run~%") + #t))) (define (get-python-version python) (let* ((version (last (string-split python #\-))) -- 2.11.0 --=-=-=--