* [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test.
2018-01-10 9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
@ 2018-01-10 10:33 ` julien lepiller
2018-01-20 22:10 ` [bug#30062] Replace the version in the test Gábor Boskovits
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: julien lepiller @ 2018-01-10 10:33 UTC (permalink / raw)
To: 30062
Le 2018-01-10 10:33, Gábor Boskovits a écrit :
> * gnu/packages/java.scm (java-ops4j-pax-tinybundles)[arguments]:
> Modify #:test-exclude
> to disable all bnd tests.
>
> The bnd testsuite hardcodes the version of bnd, making it impossible
> to update bnd
> independently. Disable it to avoid test failures on bnd updates.
> ---
> gnu/packages/java.scm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index e1e9093df..3e32eb882 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -6054,7 +6054,8 @@ it manages project dependencies, gives diffs
> jars, and much more.")
> #:source-dir "src/main/java"
> #:test-exclude
> ;; Abstract base classes for other tests
> - (list "**/BndTest.java" "**/CoreTest.java")
> + ;; Disable bnd tests, they hardcode the version of bnd.
> + (list "**/Bnd*Test.java" "**/CoreTest.java")
> #:phases
> (modify-phases %standard-phases
> (add-before 'check 'fix-version
Couldn't we use substitute* to replace the hardcoded version with our
own version of bnd?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] Replace the version in the test
2018-01-10 9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
2018-01-10 10:33 ` julien lepiller
@ 2018-01-20 22:10 ` Gábor Boskovits
2018-01-29 9:05 ` [bug#30062] Help wanted Gábor Boskovits
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Gábor Boskovits @ 2018-01-20 22:10 UTC (permalink / raw)
To: 30062, julien
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
Hello!
Unfortunately I did not get the previous message on this bug.
I will have a look into this if we can use substitute* to replace the
version.
I will send my findings and an update patch, if possible.
[-- Attachment #2: Type: text/html, Size: 303 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] Help wanted
2018-01-10 9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
2018-01-10 10:33 ` julien lepiller
2018-01-20 22:10 ` [bug#30062] Replace the version in the test Gábor Boskovits
@ 2018-01-29 9:05 ` Gábor Boskovits
2018-01-29 9:22 ` Chris Marusich
2018-03-03 21:59 ` [bug#30062] [PATCH] gnu: java-ops4j-pax-tinybundles: Use distribution bndlib version Gábor Boskovits
` (2 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Gábor Boskovits @ 2018-01-29 9:05 UTC (permalink / raw)
To: Chris Marusich, 30062
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
Hello Chris!
Could you help me out on this?
It seems that I should somehow extract the version string from the input to
use in substitute*, to fix the version string in tests. What would be the
proper way of doing this?
[-- Attachment #2: Type: text/html, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] Help wanted
2018-01-29 9:05 ` [bug#30062] Help wanted Gábor Boskovits
@ 2018-01-29 9:22 ` Chris Marusich
2018-01-29 9:55 ` Gábor Boskovits
0 siblings, 1 reply; 10+ messages in thread
From: Chris Marusich @ 2018-01-29 9:22 UTC (permalink / raw)
To: Gábor Boskovits; +Cc: 30062
[-- Attachment #1: Type: text/plain, Size: 1870 bytes --]
Gábor Boskovits <boskovits@gmail.com> writes:
> Hello Chris!
>
> Could you help me out on this?
>
> It seems that I should somehow extract the version string from the input to
> use in substitute*, to fix the version string in tests. What would be the
> proper way of doing this?
It looks like the existing code is already substituting the version
string (by hard-coding it):
--8<---------------cut here---------------start------------->8---
(arguments
`(#:jar-name "java-ops4j-pax-tinybundles.jar"
#:source-dir "src/main/java"
#:test-exclude
;; Abstract base classes for other tests
(list "**/BndTest.java" "**/CoreTest.java")
#:phases
(modify-phases %standard-phases
(add-before 'check 'fix-version
(lambda _
;; This test has a reference to an old version of bndlib we are not
;; packaging. It uses the version referenced in pom.xml. We replace
;; it with our own version.
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
(("2.4.0.201411031534") "3.4.0")))))))
--8<---------------cut here---------------end--------------->8---
I think we could probably just make a change like the following (I
haven't tested this, though):
--8<---------------cut here---------------start------------->8---
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
- (("2.4.0.201411031534") "3.4.0")))))))
+ (("2.4.0.201411031534") ,(package-version java-aqute-bndlib))))))))
--8<---------------cut here---------------end--------------->8---
The comma is 'unquote' (see: (guile) Expression Syntax), which should
insert the package version of java-aqute-bndlib into the quasi-quoted
list.
Does that help?
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] Help wanted
2018-01-29 9:22 ` Chris Marusich
@ 2018-01-29 9:55 ` Gábor Boskovits
2018-01-29 10:08 ` Danny Milosavljevic
0 siblings, 1 reply; 10+ messages in thread
From: Gábor Boskovits @ 2018-01-29 9:55 UTC (permalink / raw)
To: Chris Marusich; +Cc: 30062
[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]
2018-01-29 10:22 GMT+01:00 Chris Marusich <cmmarusich@gmail.com>:
> Gábor Boskovits <boskovits@gmail.com> writes:
>
> > Hello Chris!
> >
> > Could you help me out on this?
> >
> > It seems that I should somehow extract the version string from the input
> to
> > use in substitute*, to fix the version string in tests. What would be the
> > proper way of doing this?
>
> It looks like the existing code is already substituting the version
> string (by hard-coding it):
>
> --8<---------------cut here---------------start------------->8---
> (arguments
> `(#:jar-name "java-ops4j-pax-tinybundles.jar"
> #:source-dir "src/main/java"
> #:test-exclude
> ;; Abstract base classes for other tests
> (list "**/BndTest.java" "**/CoreTest.java")
> #:phases
> (modify-phases %standard-phases
> (add-before 'check 'fix-version
> (lambda _
> ;; This test has a reference to an old version of bndlib we
> are not
> ;; packaging. It uses the version referenced in pom.xml. We
> replace
> ;; it with our own version.
> (substitute* "src/test/java/org/ops4j/pax/
> tinybundles/bnd/BndTest.java"
> (("2.4.0.201411031534") "3.4.0")))))))
> --8<---------------cut here---------------end--------------->8---
>
> I think we could probably just make a change like the following (I
> haven't tested this, though):
>
> --8<---------------cut here---------------start------------->8---
> (substitute* "src/test/java/org/ops4j/pax/
> tinybundles/bnd/BndTest.java"
> - (("2.4.0.201411031534") "3.4.0")))))))
> + (("2.4.0.201411031534") ,(package-version
> java-aqute-bndlib))))))))
> --8<---------------cut here---------------end--------------->8---
>
> The comma is 'unquote' (see: (guile) Expression Syntax), which should
> insert the package version of java-aqute-bndlib into the quasi-quoted
> list.
>
> Does that help?
>
> Yes, thanks. This has the piece of information I was missing.
I would also like to replace the matching expression to be something less
specific, because
it would be nice, if upon upgrade we could just flip the version and the
hash.
I will try to get this done by wednesday.
> --
> Chris
>
[-- Attachment #2: Type: text/html, Size: 3382 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] Help wanted
2018-01-29 9:55 ` Gábor Boskovits
@ 2018-01-29 10:08 ` Danny Milosavljevic
0 siblings, 0 replies; 10+ messages in thread
From: Danny Milosavljevic @ 2018-01-29 10:08 UTC (permalink / raw)
To: Gábor Boskovits; +Cc: 30062, Chris Marusich
Hi Gabor,
I've checked the source code of org.ops4j.pax.tinybundles-tinybundles-2.1.1
~/x/org.ops4j.pax.tinybundles-tinybundles-2.1.1$ grep -r 2.4.0.2014 .
./src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java: assertEquals( "Header Tool", "Bnd-2.4.0.201411031534", man.getMainAttributes().getValue( "Tool" ) );
So the substitution could also be
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
(("2\\.4\\.0\\.[0-9][0-9]*")
,(package-version java-aqute-bndlib)))
Or maybe even
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
(("[0-9][0-9]*\\.[0-9][0-9]*.[0-9][0-9]*\\.[0-9][0-9]*")
,(package-version java-aqute-bndlib)))
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] [PATCH] gnu: java-ops4j-pax-tinybundles: Use distribution bndlib version.
2018-01-10 9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
` (2 preceding siblings ...)
2018-01-29 9:05 ` [bug#30062] Help wanted Gábor Boskovits
@ 2018-03-03 21:59 ` Gábor Boskovits
2018-03-03 22:13 ` [bug#30062] Unblocks #29893 Gábor Boskovits
2018-03-04 9:02 ` [bug#30062] Please push this to master Gábor Boskovits
5 siblings, 0 replies; 10+ messages in thread
From: Gábor Boskovits @ 2018-03-03 21:59 UTC (permalink / raw)
To: 30062; +Cc: Gábor Boskovits
* gnu/packages/java.scm (java-ops4j-pax-tinybundles)[arguments](#phases):
Modify fix-version to use the distibution version of java-aqute-bndlib.
---
gnu/packages/java.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0f8c04e8b..cdf4cba82 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -6537,7 +6537,8 @@ it manages project dependencies, gives diffs jars, and much more.")
;; packaging. It uses the version referenced in pom.xml. We replace
;; it with our own version.
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
- (("2.4.0.201411031534") "3.4.0")))))))
+ (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
+ ,(package-version java-aqute-bndlib))))))))
(inputs
`(("lang" ,java-ops4j-base-lang)
("io" ,java-ops4j-base-io)
--
2.16.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#30062] Unblocks #29893
2018-01-10 9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
` (3 preceding siblings ...)
2018-03-03 21:59 ` [bug#30062] [PATCH] gnu: java-ops4j-pax-tinybundles: Use distribution bndlib version Gábor Boskovits
@ 2018-03-03 22:13 ` Gábor Boskovits
2018-03-04 9:02 ` [bug#30062] Please push this to master Gábor Boskovits
5 siblings, 0 replies; 10+ messages in thread
From: Gábor Boskovits @ 2018-03-03 22:13 UTC (permalink / raw)
To: 30062
[-- Attachment #1: Type: text/plain, Size: 46 bytes --]
Once this is merged please also merge #29893.
[-- Attachment #2: Type: text/html, Size: 67 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#30062] Please push this to master
2018-01-10 9:33 [bug#30062] [PATCH core-updates] gnu: java-ops4j-pax-tinybundles: Disable failing test Gábor Boskovits
` (4 preceding siblings ...)
2018-03-03 22:13 ` [bug#30062] Unblocks #29893 Gábor Boskovits
@ 2018-03-04 9:02 ` Gábor Boskovits
5 siblings, 0 replies; 10+ messages in thread
From: Gábor Boskovits @ 2018-03-04 9:02 UTC (permalink / raw)
To: 30062
[-- Attachment #1: Type: text/plain, Size: 128 bytes --]
The original tag says this is a core-updates patch, but since then
core-updates has been merged, so please push this to master.
[-- Attachment #2: Type: text/html, Size: 149 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread