GNU bug report logs -
#31333
[PATCH] Add groovy
Previous Next
Reported by: Julien Lepiller <julien <at> lepiller.eu>
Date: Tue, 1 May 2018 15:42:02 UTC
Severity: normal
Tags: patch
Done: Julien Lepiller <julien <at> lepiller.eu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/groovy.scm (groovy-test): New variable.
---
gnu/packages/groovy.scm | 45 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 97944e1ef..ff777a01d 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -203,3 +203,48 @@ is used to build the groovy submodules written in groovy.")))
(synopsis "Groovy test classes")
(description "This package contains three classes required for testing
other groovy submodules.")))
+
+(define groovy-test
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-test")
+ (arguments
+ `(#:jar-name "groovy-test.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "subprojects/groovy-test/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (mkdir-p "build/classes")
+ (mkdir-p "build/jar")
+ (and
+ (zero? (apply system* "java" "-cp" (getenv "CLASSPATH")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-d" "build/classes"
+ "-j"; joint compilation
+ (find-files "subprojects/groovy-test/src/main"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "jar" "-cf" "build/jar/groovy-test.jar"
+ "-C" "build/classes" ".")))))
+ (replace 'check
+ (lambda _
+ (mkdir-p "build/test-classes")
+ (substitute* "build.xml"
+ (("depends=\"compile-tests\"") "depends=\"\"")
+ (("}/java") "}/groovy"))
+ (zero? (apply system* "java" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-d" "build/test-classes"
+ "-j"
+ (append
+ (find-files "subprojects/groovy-test/src/test"
+ ".*\\.(groovy|java)$"))))
+ (zero? (system* "ant" "check")))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy test submodule")
+ (description "This package contains the test submodules used to test
+other groovy submodules.")))
--
2.17.0
This bug report was last modified 7 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.