Leo Famulari <[email protected]> writes:

> On Mon, Dec 12, 2016 at 12:05:57AM +0100, Marius Bakke wrote:
>> Marius Bakke <[email protected]> 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:

Attachment: signature.asc
Description: PGP signature

>From e069a7f1927ade7a178cb876ee4b4c339a093ba5 Mon Sep 17 00:00:00 2001
From: Marius Bakke <[email protected]>
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

Reply via email to