aboutsummaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2017-09-05 22:14:11 +0200
committerJulien Lepiller <julien@lepiller.eu>2017-10-03 21:38:23 +0200
commitf403d7abdf28d2d6e4446a2989e0d37d023b6b53 (patch)
tree8f7c5566d4171e19d2503cd44ddc90d5e6feee1f /guix/build
parent8df1faa047870c51954275664e8e7efc94e6fc56 (diff)
downloadgnu-guix-f403d7abdf28d2d6e4446a2989e0d37d023b6b53.tar
gnu-guix-f403d7abdf28d2d6e4446a2989e0d37d023b6b53.tar.gz
guix: ant-build-system: Add #:test-include and #:test-exclude arguments.
* guix/build-system/ant.scm: Add #:test-include and #:test-exclude arguments. * guix/build/ant-build-system.scm: Generate test list from arguments. * doc/guix.texi (Build Systems): Document it.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/ant-build-system.scm17
1 files changed, 13 insertions, 4 deletions
diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index 727d3a3b25..a440daf054 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -36,7 +36,9 @@
;; Code:
(define* (default-build.xml jar-name prefix #:optional
- (source-dir ".") (test-dir "./test") (main-class #f))
+ (source-dir ".") (test-dir "./test") (main-class #f)
+ (test-include '("**/*Test.java"))
+ (test-exclude '("**/Abstract*Test.java")))
"Create a simple build.xml with standard targets for Ant."
(call-with-output-file "build.xml"
(lambda (port)
@@ -109,7 +111,12 @@
(batchtest (@ (fork "yes")
(todir "${test.home}/test-reports"))
(fileset (@ (dir "${test.home}/java"))
- (include (@ (name "**/*Test.java" )))))))
+ ,@(map (lambda (file)
+ `(include (@ (name ,file))))
+ test-include)
+ ,@(map (lambda (file)
+ `(exclude (@ (name ,file))))
+ test-exclude)))))
(target (@ (name "jar")
(depends "compile, manifest"))
@@ -150,12 +157,14 @@ to the default GNU unpack strategy."
(define* (configure #:key inputs outputs (jar-name #f)
(source-dir "src")
(test-dir "src/test")
- (main-class #f) #:allow-other-keys)
+ (main-class #f)
+ (test-include '("**/*Test.java"))
+ (test-exclude '("**/Abstract*.java")) #:allow-other-keys)
(when jar-name
(default-build.xml jar-name
(string-append (assoc-ref outputs "out")
"/share/java")
- source-dir test-dir main-class))
+ source-dir test-dir main-class test-include test-exclude))
(setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
(setenv "CLASSPATH" (generate-classpath inputs)))