gnu: gn: Enable tests.

* gnu/packages/build-tools.scm (gn)[arguments]: Remove #:tests?.  Override
'check' phase.
This commit is contained in:
Marius Bakke 2019-11-14 16:59:37 +01:00
parent d922724521
commit 97b672d99f
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -117,8 +117,7 @@ (define-public gn
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? #f ;FIXME: How to run? `(#:phases (modify-phases %standard-phases
#:phases (modify-phases %standard-phases
(add-before 'configure 'set-build-environment (add-before 'configure 'set-build-environment
(lambda _ (lambda _
(setenv "CC" "gcc") (setenv "CXX" "g++") (setenv "CC" "gcc") (setenv "CXX" "g++")
@ -142,6 +141,14 @@ (define-public gn
(lambda _ (lambda _
(invoke "ninja" "-C" "out" "gn" (invoke "ninja" "-C" "out" "gn"
"-j" (number->string (parallel-job-count))))) "-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 (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))