summaryrefslogtreecommitdiff
path: root/guix/build/android-ndk-build-system.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-05-10 00:05:58 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2018-05-10 01:06:22 +0200
commit9ed36cd3d6a4146f5f314b79a6fd6ada93d03164 (patch)
tree2e42487a1bcac110a70c5fde99736262ea422569 /guix/build/android-ndk-build-system.scm
parent3385db349f05cec431099e8a693afa0f957c57b5 (diff)
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.
Diffstat (limited to 'guix/build/android-ndk-build-system.scm')
-rw-r--r--guix/build/android-ndk-build-system.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/guix/build/android-ndk-build-system.scm b/guix/build/android-ndk-build-system.scm
index b5d4b36d30..86d0858488 100644
--- a/guix/build/android-ndk-build-system.scm
+++ b/guix/build/android-ndk-build-system.scm
@@ -68,11 +68,15 @@
(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