* [PATCH 0/3] Emhancements to the ant-build-system
@ 2016-09-05 9:24 Hartmut Goebel
2016-09-05 9:24 ` [PATCH 1/3] guix: ant-build-system: put dummy project-name into default build.xml Hartmut Goebel
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-05 9:24 UTC (permalink / raw)
To: guix-devel
Enclosed please find two minor enhancments to the ant-build-system and a
small clean-up resulting from these.
Hartmut Goebel (3):
guix: ant-build-system: put dummy project-name into default build.xml.
guix: ant-build-system: add empty `tests` target to default build.xml.
gnu: Remove now useless #:tests? #f from java-packages.
gnu/packages/java.scm | 7 ++-----
guix/build/ant-build-system.scm | 4 +++-
2 files changed, 5 insertions(+), 6 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] guix: ant-build-system: put dummy project-name into default build.xml.
2016-09-05 9:24 [PATCH 0/3] Emhancements to the ant-build-system Hartmut Goebel
@ 2016-09-05 9:24 ` Hartmut Goebel
2016-09-05 9:24 ` [PATCH 2/3] guix: ant-build-system: add empty `tests` target to " Hartmut Goebel
2016-09-05 9:24 ` [PATCH 3/3] gnu: Remove now useless #:tests? #f from java-packages Hartmut Goebel
2 siblings, 0 replies; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-05 9:24 UTC (permalink / raw)
To: guix-devel
Without this, ant reported error messages like
Target "tests" does not exist in the project "null".
Simple using the jar-name is a good compromise.
* guix/build/ant-build-system.scm (default-build.xml): Add attribute
to sxml expression.
---
guix/build/ant-build-system.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index 00a4a46..fe7bae5 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -40,7 +40,8 @@
(call-with-output-file "build.xml"
(lambda (port)
(sxml->xml
- `(project (@ (basedir "."))
+ `(project (@ (basedir ".")
+ (name ,jar-name))
(property (@ (name "classes.dir")
(value "${basedir}/build/classes")))
(property (@ (name "jar.dir")
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] guix: ant-build-system: add empty `tests` target to default build.xml.
2016-09-05 9:24 [PATCH 0/3] Emhancements to the ant-build-system Hartmut Goebel
2016-09-05 9:24 ` [PATCH 1/3] guix: ant-build-system: put dummy project-name into default build.xml Hartmut Goebel
@ 2016-09-05 9:24 ` Hartmut Goebel
2016-09-05 10:59 ` Vincent Legoll
2016-09-05 9:24 ` [PATCH 3/3] gnu: Remove now useless #:tests? #f from java-packages Hartmut Goebel
2 siblings, 1 reply; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-05 9:24 UTC (permalink / raw)
To: guix-devel
This avoids the need to set #:tests? #f whenever using #:jar-name
(and thus using the default build.xml).
* guix/build/ant-build-system.scm (default-build.xml): Add attribute
to sxml expression.
---
guix/build/ant-build-system.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index fe7bae5..2cc6bb9 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -70,6 +70,7 @@
(arg (@ (line ,(string-append "-cf ${jar.dir}/" jar-name
" -C ${classes.dir} ."))))))
+ (target (@ (name "tests")))
(target (@ (name "install"))
(copy (@ (todir "${dist.dir}"))
(fileset (@ (dir "${jar.dir}"))
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] guix: ant-build-system: add empty `tests` target to default build.xml.
2016-09-05 9:24 ` [PATCH 2/3] guix: ant-build-system: add empty `tests` target to " Hartmut Goebel
@ 2016-09-05 10:59 ` Vincent Legoll
2016-09-05 11:32 ` Hartmut Goebel
0 siblings, 1 reply; 10+ messages in thread
From: Vincent Legoll @ 2016-09-05 10:59 UTC (permalink / raw)
To: Hartmut Goebel; +Cc: guix-devel
Hello,
On Mon, Sep 5, 2016 at 11:24 AM, Hartmut Goebel
<h.goebel@crazy-compilers.com> wrote:
> This avoids the need to set #:tests? #f whenever using #:jar-name
> (and thus using the default build.xml).
Isn't it a bit misleading to have a test target that does no real
testing, or am I
misunderstanding this patch ?
--
Vincent Legoll
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] guix: ant-build-system: add empty `tests` target to default build.xml.
2016-09-05 10:59 ` Vincent Legoll
@ 2016-09-05 11:32 ` Hartmut Goebel
2016-09-05 20:26 ` Danny Milosavljevic
0 siblings, 1 reply; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-05 11:32 UTC (permalink / raw)
To: Vincent Legoll; +Cc: guix-devel
Hi,
Am 05.09.2016 um 12:59 schrieb Vincent Legoll:
> On Mon, Sep 5, 2016 at 11:24 AM, Hartmut Goebel
> <h.goebel@crazy-compilers.com> wrote:
>> This avoids the need to set #:tests? #f whenever using #:jar-name
>> (and thus using the default build.xml).
> Isn't it a bit misleading to have a test target that does no real
> testing, or am I
> misunderstanding this patch ?
When specifying #:jar-file, the ant-builder will create a build.xml.
This build.xml did not include a test-target at all. So one *always* had
to include "#:tests? #f" to disable calling the (non-existing)
test-target - otherwise build would fail. But adding "#:tests? #f" is
just redundant.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] guix: ant-build-system: add empty `tests` target to default build.xml.
2016-09-05 11:32 ` Hartmut Goebel
@ 2016-09-05 20:26 ` Danny Milosavljevic
2016-09-05 20:57 ` Vincent Legoll
2016-09-06 7:13 ` Hartmut Goebel
0 siblings, 2 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2016-09-05 20:26 UTC (permalink / raw)
To: Hartmut Goebel; +Cc: guix-devel
Hi Hartmut,
On Mon, 5 Sep 2016 13:32:44 +0200
Hartmut Goebel <h.goebel@crazy-compilers.com> wrote:
> When specifying #:jar-file, the ant-builder will create a build.xml.
> This build.xml did not include a test-target at all. So one *always* had
> to include "#:tests? #f" to disable calling the (non-existing)
> test-target - otherwise build would fail. But adding "#:tests? #f" is
> just redundant.
I see what you mean. But is it still possible to easily find out which packages have tests and which haven't after your patch?
I think being able to know that is important since it's prudent to trust a package without tests (much) less.
Also, would it be possible to auto-discover jUnit tests instead?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] guix: ant-build-system: add empty `tests` target to default build.xml.
2016-09-05 20:26 ` Danny Milosavljevic
@ 2016-09-05 20:57 ` Vincent Legoll
2016-09-06 7:13 ` Hartmut Goebel
1 sibling, 0 replies; 10+ messages in thread
From: Vincent Legoll @ 2016-09-05 20:57 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Hello
On Mon, Sep 5, 2016 at 10:26 PM, Danny Milosavljevic
<dannym@scratchpost.org> wrote:
> I think being able to know that is important since it's prudent to trust a package without tests (much) less.
That's my feeling too
--
Vincent Legoll
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] guix: ant-build-system: add empty `tests` target to default build.xml.
2016-09-05 20:26 ` Danny Milosavljevic
2016-09-05 20:57 ` Vincent Legoll
@ 2016-09-06 7:13 ` Hartmut Goebel
2016-09-06 10:52 ` Vincent Legoll
1 sibling, 1 reply; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-06 7:13 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
Am 05.09.2016 um 22:26 schrieb Danny Milosavljevic:
> I see what you mean. But is it still possible to easily find out which packages have tests and which haven't after your patch?
We are talking about the case when #:jar-name is specified. Only in this
case a build.xml will be generated.
Situation prior to this patch:
The generated build.xml does not include a "test" target. Phase "check"
will fail, since it wants to build the (non-existing) "test" target.
Solutions are a) set #:test? #f, b) remove phase "check" or c) define
your own "check" phase. If you want to run tests on the package, you
need to replace the "check" phase by something meaningful.
Situation avert the patch:
The generated build.xml include a "test" target. Phase "check" will
pass, since there is now a dummy "test" target. If you want to run tests
on the package, you need to replace the "check" phase by something
meaningful.
So the *behaviour* did not check. The only thing that has changes is the
need to either a) set #:test? #f, b) remove phase "check".
As of today, only four packages define a #:jar-name and all of these had
':tests? #f'.
> Also, would it be possible to auto-discover jUnit tests instead?
Maybe. But this is beyond my Java knowledge.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/3] gnu: Remove now useless #:tests? #f from java-packages.
2016-09-05 9:24 [PATCH 0/3] Emhancements to the ant-build-system Hartmut Goebel
2016-09-05 9:24 ` [PATCH 1/3] guix: ant-build-system: put dummy project-name into default build.xml Hartmut Goebel
2016-09-05 9:24 ` [PATCH 2/3] guix: ant-build-system: add empty `tests` target to " Hartmut Goebel
@ 2016-09-05 9:24 ` Hartmut Goebel
2 siblings, 0 replies; 10+ messages in thread
From: Hartmut Goebel @ 2016-09-05 9:24 UTC (permalink / raw)
To: guix-devel
With the last commit, when #:jar-name is given, a dummy test-target
always exists.
* gnu/packages/java.scm (java-junit, java-swt, java-xz): Remove
build-argument `#:tests?'.
---
gnu/packages/java.scm | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 7387235..e8d09dd 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -84,7 +84,6 @@
(build-system ant-build-system)
(arguments
`(#:jar-name "swt.jar"
- #:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
(replace 'unpack
@@ -1054,8 +1053,7 @@ build process and its dependencies, whereas Make uses Makefile format.")
"0x6vn9dp9kxk83x2fp3394n95dk8fx9yg8jns9371iqsn0vy8ih1"))))
(build-system ant-build-system)
(arguments
- `(#:tests? #f ; There are no tests to run.
- #:jar-name ,(string-append "xz-" version ".jar")
+ `(#:jar-name ,(string-append "xz-" version ".jar")
#:phases
(modify-phases %standard-phases
;; The unpack phase enters the "maven" directory by accident.
@@ -1248,8 +1246,7 @@ testing frameworks, mocking libraries and UI validation rules.")
#t))))
(build-system ant-build-system)
(arguments
- `(#:tests? #f ; no tests
- #:jar-name "junit.jar"))
+ `(#:jar-name "junit.jar"))
(inputs
`(("java-hamcrest-core" ,java-hamcrest-core)))
(home-page "http://junit.org/")
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-09-06 10:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 9:24 [PATCH 0/3] Emhancements to the ant-build-system Hartmut Goebel
2016-09-05 9:24 ` [PATCH 1/3] guix: ant-build-system: put dummy project-name into default build.xml Hartmut Goebel
2016-09-05 9:24 ` [PATCH 2/3] guix: ant-build-system: add empty `tests` target to " Hartmut Goebel
2016-09-05 10:59 ` Vincent Legoll
2016-09-05 11:32 ` Hartmut Goebel
2016-09-05 20:26 ` Danny Milosavljevic
2016-09-05 20:57 ` Vincent Legoll
2016-09-06 7:13 ` Hartmut Goebel
2016-09-06 10:52 ` Vincent Legoll
2016-09-05 9:24 ` [PATCH 3/3] gnu: Remove now useless #:tests? #f from java-packages Hartmut Goebel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.