summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2013-09-05 18:43:18 +0200
committerAndreas Enge <andreas@enge.fr>2013-09-05 18:43:18 +0200
commit7b96bf82daf25699ce6b4f4cb2ced1e5318b576f (patch)
tree70dd1ddce5ff7fbdad77d3c4f5c166b352c59013
parentd1f30e9943bf59fa0eefe40bb9aea64df2e7a594 (diff)
downloadguix-7b96bf82daf25699ce6b4f4cb2ced1e5318b576f.tar.gz
gnu: python: Honour #:tests? and #:test-target in build system.
* guix/build/python-build-system.scm (check): Use named parameters tests?
    and test-target (default now: "test" instead of "check").
-rw-r--r--guix/build/python-build-system.scm15
1 files changed, 9 insertions, 6 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 04c223bb85..27818526fa 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -45,13 +46,15 @@
           (zero? (apply system* "python" args)))
         (error "no setup.py found"))))
 
-(define* (check #:key outputs #:allow-other-keys)
+(define* (check #:key outputs tests? test-target #:allow-other-keys)
   "Run the test suite of a given Python package."
-  (if (file-exists? "setup.py")
-      (let ((args `("setup.py" "check")))
-        (format #t "running 'python' with arguments ~s~%" args)
-        (zero? (apply system* "python" args)))
-      (error "no setup.py found")))
+  (if tests?
+    (if (file-exists? "setup.py")
+        (let ((args `("setup.py" ,test-target)))
+          (format #t "running 'python' with arguments ~s~%" args)
+          (zero? (apply system* "python" args)))
+        (error "no setup.py found"))
+    #t))
 
 (define* (wrap #:key inputs outputs #:allow-other-keys)
   (define (list-of-files dir)