From 97b672d99fd8b017a6b069b1bf5e6bd4b8e61e8f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 14 Nov 2019 16:59:37 +0100 Subject: gnu: gn: Enable tests. * gnu/packages/build-tools.scm (gn)[arguments]: Remove #:tests?. Override 'check' phase. --- gnu/packages/build-tools.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gnu/packages') 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"))) -- cgit 1.4.1