[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: gnu: java-aqute-libg: Enable tests.
From: |
Gábor Boskovits |
Subject: |
02/03: gnu: java-aqute-libg: Enable tests. |
Date: |
Sun, 24 Jun 2018 09:22:08 -0400 (EDT) |
boskovits pushed a commit to branch master
in repository guix.
commit 2ab089b7ba531b0a28e9fe65a44a8a4af4b1d2bf
Author: Gábor Boskovits <address@hidden>
Date: Sun Jun 24 14:39:17 2018 +0200
gnu: java-aqute-libg: Enable tests.
* gnu/packages/java.scm (java-aqute-libg)[arguments]: Remove #:source-dir
and #:tests?, add #:phases 'chdir and 'create-test-directory.
[native-inputs]: Add java-hamcrest-core and java-junit.
---
gnu/packages/java.scm | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index aba8119..a13f6f1 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -7000,8 +7000,6 @@ it manages project dependencies, gives diffs jars, and
much more.")
(name "java-aqute-libg")
(arguments
`(#:jar-name "java-aqute-libg.jar"
- #:source-dir "aQute.libg/src"
- #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java
directory
;; The build fails when source/target more recent than 1.7. This
;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
;;
@@ -7010,11 +7008,31 @@ it manages project dependencies, gives diffs jars, and
much more.")
;; target. It work fine on 1.7, so we use 1.7.
#:make-flags (list "-Dant.build.javac.source=1.7"
"-Dant.build.javac.target=1.7")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ ;; Change to aQute.libg directory, so that the relative
+ ;; paths in the tests aren't broken.
+ (lambda _
+ (chdir "aQute.libg")
+ #t))
+ (add-before 'check 'create-test-directory
+ ;; Copy the test directory to test/java, since that's where
+ ;; ant-build-system's default project in build.xml expects to find
+ ;; the test classes. Leave a copy in the original place to not
+ ;; break paths in tests.
+ (lambda _
+ (mkdir "src/test")
+ (copy-recursively "test" "src/test/java")
+ #t)))))
(inputs
`(("slf4j" ,java-slf4j-api)
("osgi-annot" ,java-osgi-annotation)
("java-osgi-cmpn" ,java-osgi-cmpn)
- ("osgi" ,java-osgi-core)))))
+ ("osgi" ,java-osgi-core)))
+ (native-inputs
+ `(("hamcrest" ,java-hamcrest-core)
+ ("java-junit" ,java-junit)))))
(define java-aqute-libg-bootstrap
(package