From: julien@lepiller.eu
To: 28663@debbugs.gnu.org
Subject: [bug#28663] [PATCH 02/22] guix: ant-build-system: Add #:test-include and #:test-exclude arguments.
Date: Sun, 1 Oct 2017 19:53:14 +0200 [thread overview]
Message-ID: <20171001175334.2694-2-julien@lepiller.eu> (raw)
In-Reply-To: <20171001175334.2694-1-julien@lepiller.eu>
From: Julien Lepiller <julien@lepiller.eu>
* guix/build-system/ant.scm: Add #:test-include and #:test-exclude
arguments.
* guix/build/ant-build-system.scm: Generate test list from arguments.
---
guix/build-system/ant.scm | 4 ++++
guix/build/ant-build-system.scm | 17 +++++++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/guix/build-system/ant.scm b/guix/build-system/ant.scm
index a700230ec..b5626bd42 100644
--- a/guix/build-system/ant.scm
+++ b/guix/build-system/ant.scm
@@ -100,6 +100,8 @@
(build-target "jar")
(jar-name #f)
(main-class #f)
+ (test-include (list "**/*Test.java"))
+ (test-exclude (list "**/Abstract*.java"))
(source-dir "src")
(test-dir "src/test")
(phases '(@ (guix build ant-build-system)
@@ -132,6 +134,8 @@
#:build-target ,build-target
#:jar-name ,jar-name
#:main-class ,main-class
+ #:test-include (list ,@test-include)
+ #:test-exclude (list ,@test-exclude)
#:source-dir ,source-dir
#:test-dir ,test-dir
#:phases ,phases
diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index 727d3a3b2..a440daf05 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)))
--
2.14.1
next prev parent reply other threads:[~2017-10-01 17:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-01 17:44 [bug#28663] [PATCH] New java packages Julien Lepiller
2017-10-01 17:53 ` [bug#28663] [PATCH 01/22] guix: ant-build-system: Add main-class support julien
2017-10-01 17:53 ` julien [this message]
2017-10-03 8:31 ` [bug#28663] [PATCH 02/22] guix: ant-build-system: Add #:test-include and #:test-exclude arguments Roel Janssen
2017-10-03 9:14 ` Ricardo Wurmus
2017-10-01 17:53 ` [bug#28663] [PATCH 03/22] gnu: Add java-microemulator julien
2017-10-03 7:54 ` Roel Janssen
2017-10-03 8:27 ` julien lepiller
2017-10-01 17:53 ` [bug#28663] [PATCH 04/22] gnu: Add java-datanucleus-javax-persistence julien
2017-10-01 17:53 ` [bug#28663] [PATCH 05/22] gnu: Add java-osgi-cmpn julien
2017-10-01 17:53 ` [bug#28663] [PATCH 06/22] gnu: Add java-osgi-service-component-annotations julien
2017-10-01 17:53 ` [bug#28663] [PATCH 07/22] gnu: Add java-osgi-dto julien
2017-10-01 17:53 ` [bug#28663] [PATCH 08/22] gnu: Add java-osgi-resource julien
2017-10-01 17:53 ` [bug#28663] [PATCH 09/22] gnu: Add java-osgi-namespace-contract julien
2017-10-01 17:53 ` [bug#28663] [PATCH 10/22] gnu: Add java-osgi-namespace-extender julien
2017-10-01 17:53 ` [bug#28663] [PATCH 11/22] gnu: Add java-osgi-namespace-service julien
2017-10-01 17:53 ` [bug#28663] [PATCH 12/22] gnu: Add java-osgi-util-function julien
2017-10-01 17:53 ` [bug#28663] [PATCH 13/22] gnu: Add java-osgi-util-promise julien
2017-10-01 17:53 ` [bug#28663] [PATCH 14/22] gnu: Add java-osgi-service-metatype-annotations julien
2017-10-01 17:53 ` [bug#28663] [PATCH 15/22] gnu: Add java-osgi-service-repository julien
2017-10-01 17:53 ` [bug#28663] [PATCH 16/22] gnu: Add java-osgi-framework julien
2017-10-01 17:53 ` [bug#28663] [PATCH 17/22] gnu: Add java-osgi-service-log julien
2017-10-01 17:53 ` [bug#28663] [PATCH 18/22] gnu: Add java-osgi-service-jdbc julien
2017-10-03 7:52 ` julien lepiller
2017-10-01 17:53 ` [bug#28663] [PATCH 19/22] gnu: Add java-osgi-service-resolver julien
2017-10-01 17:53 ` [bug#28663] [PATCH 20/22] gnu: Add java-osgi-util-tracker julien
2017-10-01 17:53 ` [bug#28663] [PATCH 21/22] gnu: Add java-osgi-service-cm julien
2017-10-01 17:53 ` [bug#28663] [PATCH 22/22] gnu: Add java-osgi-service-packageadmin julien
2017-10-03 7:44 ` [bug#28663] [PATCH 01/22] guix: ant-build-system: Add main-class support Roel Janssen
2017-10-03 9:09 ` Ricardo Wurmus
2017-10-03 9:50 ` julien lepiller
2017-10-03 8:38 ` [bug#28663] [PATCH] New java packages Roel Janssen
2017-10-03 19:48 ` bug#28663: " Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171001175334.2694-2-julien@lepiller.eu \
--to=julien@lepiller.eu \
--cc=28663@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).