summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-11-14 16:59:37 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-11-15 19:09:13 +0100
commit97b672d99fd8b017a6b069b1bf5e6bd4b8e61e8f (patch)
tree8b73ae9632f983603be3b78e10c43dfe3793f791 /gnu
parentd9227245219da28dd24145774295ede618a55eae (diff)
downloadguix-97b672d99fd8b017a6b069b1bf5e6bd4b8e61e8f.tar.gz
gnu: gn: Enable tests.
* gnu/packages/build-tools.scm (gn)[arguments]: Remove #:tests?.  Override
'check' phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/build-tools.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index b612cb93a8..5c11266c89 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -117,8 +117,7 @@ generate such a compilation database.")
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
-       `(#:tests? #f                    ;FIXME: How to run?
-         #:phases (modify-phases %standard-phases
+       `(#:phases (modify-phases %standard-phases
                     (add-before 'configure 'set-build-environment
                       (lambda _
                         (setenv "CC" "gcc") (setenv "CXX" "g++")
@@ -142,6 +141,14 @@ generate such a compilation database.")
                       (lambda _
                         (invoke "ninja" "-C" "out" "gn"
                                 "-j" (number->string (parallel-job-count)))))
+                    (replace 'check
+                      (lambda* (#:key (tests? #t) #:allow-other-keys)
+                        (if tests?
+                            (lambda ()
+                              (invoke "ninja" "-C" "out" "gn_unittests"
+                                      "-j" (number->string (parallel-job-count)))
+                              (invoke "./out/gn_unittests"))
+                            (format #t "test suite not run~%"))))
                     (replace 'install
                       (lambda* (#:key outputs #:allow-other-keys)
                         (let ((out (assoc-ref outputs "out")))