mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 13:58:15 -05:00
build-system: android-ndk: Support unit tests.
* guix/build-system/android-ndk.scm (android-ndk-build): Add googletest. * guix/build/android-ndk-build-system.scm (check): Check whether tests are enabled. Run root-level tests as well.
This commit is contained in:
parent
3385db349f
commit
9ed36cd3d6
2 changed files with 10 additions and 5 deletions
|
@ -113,6 +113,7 @@ (define private-keywords
|
|||
;; Keep the standard inputs of 'gnu-build-system'
|
||||
,@(standard-packages)))
|
||||
(build-inputs `(("android-make-stub" ,(module-ref (resolve-interface '(gnu packages android)) 'android-make-stub))
|
||||
("googletest" ,(module-ref (resolve-interface '(gnu packages check)) 'googletest))
|
||||
,@native-inputs))
|
||||
(outputs outputs)
|
||||
(build android-ndk-build)
|
||||
|
|
|
@ -68,11 +68,15 @@ (define* (install #:key inputs outputs (make-flags '()) #:allow-other-keys)
|
|||
(copy-recursively "include" (string-append out "/include")))
|
||||
#t))
|
||||
|
||||
(define* (check #:key inputs outputs tests? (make-flags '()) #:allow-other-keys)
|
||||
;; TODO: Also handle root-level tests.
|
||||
(when (and (file-exists? "tests") tests?)
|
||||
(with-directory-excursion "tests"
|
||||
(apply invoke "make" "check" make-flags))))
|
||||
(define* (check #:key target inputs outputs (tests? (not target)) (make-flags '()) #:allow-other-keys)
|
||||
(if tests?
|
||||
(begin
|
||||
(apply invoke "make" "check" make-flags)
|
||||
(when (and (file-exists? "tests") tests?)
|
||||
(with-directory-excursion "tests"
|
||||
(apply invoke "make" "check" make-flags))))
|
||||
(format #t "test suite not run~%"))
|
||||
#t)
|
||||
|
||||
(define %standard-phases
|
||||
(modify-phases gnu:%standard-phases
|
||||
|
|
Loading…
Reference in a new issue