Issue Details (XML | Word | Printable)

Key: LUCENE-1202
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Grant Ingersoll
Reporter: Hoss Man
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Clover setup currently has some problems

Created: 05/Mar/08 10:20 PM   Updated: 17/Mar/08 12:36 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works LUCENE-1202.db-contrib-instrumentation.patch 2008-03-05 10:22 PM Hoss Man 2 kB
Text File Licensed for inclusion in ASF works LUCENE-1202.patch 2008-03-14 07:08 AM Hoss Man 2 kB

Lucene Fields: New
Resolution Date: 17/Mar/08 12:36 PM


 Description  « Hide
(tracking as a bug before it get lost in email...
http://www.nabble.com/Clover-reports-missing-from-hudson--to15510616.html#a15510616
)

The clover setup for Lucene currently has some problems, 3 i think...

1) instrumentation fails on contrib/db/ because it contains java packages the ASF Clover lscence doesn't allow instrumentation of. i have a patch for this.

2) running instrumented contrib tests for other contribs produce strange errors...

monospaced
[junit] Testsuite: org.apache.lucene.analysis.el.GreekAnalyzerTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.126 sec
[junit]
[junit] ------------- Standard Error -----------------
[junit] [CLOVER] FATAL ERROR: Clover could not be initialised. Are you sure you have Clover
in the runtime classpath? (class
java.lang.NoClassDefFoundError:com_cenqua_clover/CloverVersionInfo)
[junit] ------------- ---------------- ---------------
[junit] Testcase: testAnalyzer(org.apache.lucene.analysis.el.GreekAnalyzerTest): Caused
an ERROR
[junit] com_cenqua_clover/g
[junit] java.lang.NoClassDefFoundError: com_cenqua_clover/g
[junit] at org.apache.lucene.analysis.el.GreekAnalyzer.<init>(GreekAnalyzer.java:157)
[junit] at
org.apache.lucene.analysis.el.GreekAnalyzerTest.testAnalyzer(GreekAnalyzerTest.java:60)
[junit]
[junit]
[junit] Test org.apache.lucene.analysis.el.GreekAnalyzerTest FAILED
monospaced

...i'm not sure what's going on here. the error seems to happen both when
trying to run clover on just a single contrib, or when doing the full
build ... i suspect there is an issue with the way the batchtests fork
off, but I can't see why it would only happen to contribs (the regular
tests fork as well)

3) according to Grant...

quote
...There is also a bit of a change on Hudson during the migration to the new servers that needs to be ironed out.
quote



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Hoss Man added a comment - 05/Mar/08 10:22 PM
patch to limit the files we ask clover to instrument to those we (expect) to be in the allowed packages. solves the problem with contrib/db and any future code that may work like it.

Hoss Man made changes - 05/Mar/08 10:22 PM
Field Original Value New Value
Attachment LUCENE-1202.db-contrib-instrumentation.patch [ 12377201 ]
Grant Ingersoll added a comment - 06/Mar/08 01:39 PM
Does the Clover license allow instrumenting non a.o packages, as in:

Hoss Man added a comment - 14/Mar/08 05:13 AM

Does the Clover license allow instrumenting non a.o packages, as in:

...per the README file i linked to, it allows instrumenting of those exact packages (hence the fileset - we'll probably never have "org.w3c.*" packages in our code base, but I include them for completeness.


Hoss Man added a comment - 14/Mar/08 07:08 AM
builds on previous patch to fix contrib/db (which i should note: also centralized teh clover "db" and reports so they were in one place even if you ran clover on individual contribs) to also fix it so the classpath for runing the contrib tests can find clover.

without this patch, contrib tests don't include ${java.class.path} (the core tests did) ... this was causing a problem because ${java.class.path} is where i had the clover jar and dependencies.

i'm not sure if we want to change this to add an explicit "clover.path" property that people must set saying explicitly where they want the build system to look for clover ... that seems like a cleaner way to ensure the contrib tests don't include stuff in the junit classpath that they shouldn't - but it may not be a big deal considering the core tests have always worked this way.

comments?

Grant: still need clarification on your comments about hudson...

...There is also a bit of a change on Hudson during the migration to the new servers that needs to be ironed out.


Hoss Man made changes - 14/Mar/08 07:08 AM
Attachment LUCENE-1202.patch [ 12377875 ]
Grant Ingersoll added a comment - 15/Mar/08 02:44 AM
You expect me to remember something said that long ago?

I believe it has to do with where clover and other libraries are now located. Before they were in ant/lib, now they are elsewhere. When you commit these, I can look into that piece.


Repository Revision Date User Message
ASF #637344 Sat Mar 15 03:16:43 UTC 2008 hossman LUCENE-1202 - tweaks to build system to make clover work better with contribs
Files Changed
MODIFY /lucene/java/trunk/contrib/contrib-build.xml
MODIFY /lucene/java/trunk/CHANGES.txt
MODIFY /lucene/java/trunk/common-build.xml

Hoss Man added a comment - 15/Mar/08 03:19 AM

I was hoping seeing it again would jog your memory : )

i committed the changes to the build files, if the hudson problem was related to the classpath for clover this may magically solve that problem – if not, just makesure whatever directory clover is in gets added to the CLASSPATH before running ant.

Committed revision 637344.

assigning to you to track the hudson config fiddling


Hoss Man made changes - 15/Mar/08 03:19 AM
Assignee Grant Ingersoll [ gsingers ]
Repository Revision Date User Message
ASF #637716 Mon Mar 17 04:26:30 UTC 2008 hossman more for LUCENE-1202 ... Hudson's clover plugin wants the XML format of the report, it's cheap so generate it everytime
Files Changed
MODIFY /lucene/java/trunk/common-build.xml

Grant Ingersoll added a comment - 17/Mar/08 12:36 PM
OK, I confirm that Clover reports are now being generated. Looks like we need to write some more tests!

Grant Ingersoll made changes - 17/Mar/08 12:36 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]