GNU bug report logs - #25177
Test failures don't cause some Python packages to fail [was Re: [PATCH 05/11] gnu: Add python-pygit2.]

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Sun, 11 Dec 2016 22:36:02 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Marius Bakke <mbakke <at> fastmail.com>
To: Leo Famulari <leo <at> famulari.name>
Cc: 25177 <at> debbugs.gnu.org
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:34:34 +0100
[Message part 1 (text/plain, inline)]
Leo Famulari <leo <at> famulari.name> writes:

> On Mon, Dec 12, 2016 at 12:05:57AM +0100, Marius Bakke wrote:
>> Marius Bakke <mbakke <at> fastmail.com> writes:
>> 
>> > Perhaps something like this would work (untested)?
>> 
>> Oops, here is the patch I wanted to attach:
>
> Can you make it a patch? :)

I'm testing it now on a branch, will report on the results in while. Here
it is in patch form:

[signature.asc (application/pgp-signature, inline)]
[0001-build-system-python-Make-sure-return-value-from-chec.patch (text/x-patch, inline)]
From e069a7f1927ade7a178cb876ee4b4c339a093ba5 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke <at> fastmail.com>
Date: Mon, 12 Dec 2016 00:25:27 +0100
Subject: [PATCH] build-system/python: Make sure return value from 'check' is
 preserved.

* guix/build/python-build-system.scm (check): Wrap 'call-setuppy' in 'if' so
that it actually fails when the tests fail.
---
 guix/build/python-build-system.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 3f280b0ac..20eb24edc 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -137,11 +137,13 @@
       ;; (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)
+      #t))
 
 (define (get-python-version python)
   (let* ((version     (last (string-split python #\-)))
-- 
2.11.0


This bug report was last modified 8 years and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.