You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(66) |
Apr
(29) |
May
(85) |
Jun
(66) |
Jul
(24) |
Aug
(139) |
Sep
(72) |
Oct
(26) |
Nov
(142) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(55) |
Feb
(72) |
Mar
(43) |
Apr
(60) |
May
(95) |
Jun
(22) |
Jul
(48) |
Aug
(17) |
Sep
(54) |
Oct
(30) |
Nov
(82) |
Dec
(17) |
2007 |
Jan
(23) |
Feb
(38) |
Mar
(46) |
Apr
(12) |
May
(77) |
Jun
(77) |
Jul
(94) |
Aug
(51) |
Sep
(38) |
Oct
(57) |
Nov
(39) |
Dec
(67) |
2008 |
Jan
(38) |
Feb
(56) |
Mar
(42) |
Apr
(46) |
May
(37) |
Jun
(43) |
Jul
(52) |
Aug
(22) |
Sep
(22) |
Oct
(34) |
Nov
(37) |
Dec
(29) |
2009 |
Jan
(27) |
Feb
(35) |
Mar
(67) |
Apr
(37) |
May
(31) |
Jun
(79) |
Jul
(71) |
Aug
(59) |
Sep
(31) |
Oct
(47) |
Nov
(36) |
Dec
(7) |
2010 |
Jan
(15) |
Feb
(87) |
Mar
(38) |
Apr
(33) |
May
(24) |
Jun
(47) |
Jul
(26) |
Aug
(28) |
Sep
(33) |
Oct
(13) |
Nov
(8) |
Dec
(36) |
2011 |
Jan
(32) |
Feb
(10) |
Mar
(29) |
Apr
(29) |
May
(17) |
Jun
(14) |
Jul
(33) |
Aug
(11) |
Sep
(7) |
Oct
(7) |
Nov
(6) |
Dec
(10) |
2012 |
Jan
(19) |
Feb
(12) |
Mar
(16) |
Apr
(6) |
May
(18) |
Jun
(18) |
Jul
(31) |
Aug
(25) |
Sep
|
Oct
(31) |
Nov
(21) |
Dec
(9) |
2013 |
Jan
(8) |
Feb
(16) |
Mar
(8) |
Apr
(7) |
May
(3) |
Jun
(29) |
Jul
(29) |
Aug
|
Sep
(7) |
Oct
(9) |
Nov
(1) |
Dec
(1) |
2014 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(13) |
May
(8) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(4) |
Oct
(2) |
Nov
|
Dec
(2) |
2015 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark D. <Mar...@sa...> - 2005-06-15 18:33:21
|
I'll respond to this out of order... > 2) In the xmlreport there is a line that looks like this: =09 > <coverage src=3D"sourceDirectory"> > that gets printed out at the top of the file. What would you=20 > want to see in a multiple source directory format? That's a pretty minor detail. I'm not averse to removing the src = attribute; I doubt many people are using it. Or maybe add a nested = <source> tag that mirrors the fileset specified by cobertura-report? In = any case, I have no problems with doing this as a separate patch, after = this other stuff is working. > 1) How many people do you feel are using the library in the=20 > NON-ant way? Would a change in their API be acceptable? Probably not too many. An API change is definitely acceptable if it's = required to support multiple source directories. If the API change is = not required, but will make things a whole lot less ugly, then that = should be ok, too. > 3) Instrumentation bug that only allows one fileset (aha!=20 > found it in the bug reports) Would a change in the=20 > Main.class command line args be acceptable to fix this issue? > I believe that if we are going the fileset route then we have=20 > to tie the sourcefile to its parent base directory and be=20 > diligent about picking the correct file. I have implemented=20 > this approach. However, it will take a bit of effort for the=20 > command line folks to change over to a new way of encoding=20 > the parameters. They will have to specify a "--sourceFile=20 > <srcDir>,<srcFile>" for each source file they wish to include. Yes, sourcefiles should definitely be tied to a specific parent base = directory. Could we ret rid of the --basedir argument completely and = specify directories and files as follows cobertura-instrument.bat --datafile C:\cobertura.ser C:\mysrcdir1 = C:\mysrcdir2 C:\mysrcdir3\com\example\meatballfactory = C:\mysrcdir3\com\example\meatballconsumer C:\mysrcdir4 -Mark |
From: Mark D. <Mar...@sa...> - 2005-06-15 18:22:45
|
It sounds like you need to pass a sysproperty to the Junit task that = specifies the location of the cobertura.ser file. Something like <junit ...> <sysproperty key=3D"net.sourceforge.cobertura.datafile" value=3D"${cobertura.file}"/> </junit> Also, the merge tasks has problems in Cobertura 1.3. It should be a = better in CVS, but could still use some more testing. -Mark =20 > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of bastard metheus > Sent: Wednesday, June 15, 2005 2:14 PM > To: Cob...@li... > Subject: [Cobertura-devel] duplicate copies of cobertura.ser file?? >=20 > I've been working with getting cobertura reports to generate=20 > properly and so=20 > far i've noticed that even if i specify the same datafile=20 > location for both=20 > cobertura-instrument and cobertura-report tags, an=20 > additionally coberura.ser=20 > file is stored 2 directories up from my basedir. This=20 > additional file causes=20 > the reports to display 0% (line & branch) coverage. I've=20 > haven't had any=20 > luck with the cobertura-merge tag, it doesn't seem to be=20 > working properly.=20 > Anyway I've decided to point to the ser file that is 2=20 > directories up when=20 > reporting and just move it to a specified locaiton when done=20 > generating the=20 > reports. This is a very ugly hack. I was wondering if anyone=20 > could help me=20 > find a quick and clean way to handle this such that only one=20 > file is ever=20 > generated in the proper location. >=20 > Thanks in advance, > -B >=20 > The following is the build target: >=20 > <target name=3D"junit" description=3D"Run All JUnit Tests" > depends=3D"remove-reports"> >=20 > <!-- > <property name=3D"corbertura.file" value=3D"cobertura.ser" /> > --> > <echo level=3D"info">Deleting Corbertura SER=20 > file=3D"${corbertura.file}</echo> > <delete file=3D"${corbertura.file}"/> > <echo level=3D"info">Deleting Instruments=20 > dir=3D"${dir.instruments}"</echo> > <delete dir=3D"${dir.instruments}" /> >=20 > <echo level=3D"info">Making Instruments=20 > Dir=3D"${dir.instruments}"</echo> > <mkdir dir=3D"${dir.instruments}"/> >=20 > <echo level=3D"info">Creating Instruments:=09 > datafile=3D"${corbertura.file}"=20 > todir=3D"${dir.instruments}" > </echo> >=20 > <cobertura-instrument datafile=3D"../../${corbertura.file}"=20 > todir=3D"${dir.instruments}"> > <fileset dir=3D"${dir.classes}"> > <!-- > Instrument all the application=20 > classes, but > don't instrument the test classes. > --> > <include name=3D"**/*.class" /> > <exclude name=3D"**/*Test.class" /> > </fileset> > </cobertura-instrument> >=20 > <echo level=3D"info">Running JUnit ${dir.test.classes}</echo> > <junit printsummary=3D"yes" haltonerror=3D"${haltonerror}"=20 > fork=3D"yes" > showoutput=3D"${showoutput}"> > <classpath location=3D"${dir.instruments}"/> > <classpath location=3D"${dir.classes}"/> > <classpath refid=3D"build_classpath"/> > <jvmarg value=3D"-Xmx${memoryValue}m"/> >=20 > <batchtest todir=3D"${dir.reports}" > haltonerror=3D"${haltonerror}" fork=3D"yes"> > <formatter type=3D"xml"/> > <fileset dir=3D"${dir.classes}"> > <include name=3D"**/*Test*.class"/> > <exclude name=3D"**/*$*.class"/> > </fileset> > </batchtest> > </junit> >=20 > <echo level=3D"info">Making=20 > dir=3D"${dir.reports.artifacts}/cobertura"</echo> > <mkdir dir=3D"${dir.reports.artifacts}/cobertura"/> > <cobertura-report format=3D"html"=20 > datafile=3D"../../${corbertura.file}" > srcdir=3D"${dir.src}" > destdir=3D"${dir.reports.artifacts}/cobertura"/> >=20 > <move file=3D"../../cobertura.ser"=20 > todir=3D"bin/test/reports/artifacts/cobertura"/> >=20 > <antcall target=3D"archive"/> > </target> |
From: bastard m. <bas...@ho...> - 2005-06-15 18:14:07
|
I've been working with getting cobertura reports to generate properly and so far i've noticed that even if i specify the same datafile location for both cobertura-instrument and cobertura-report tags, an additionally coberura.ser file is stored 2 directories up from my basedir. This additional file causes the reports to display 0% (line & branch) coverage. I've haven't had any luck with the cobertura-merge tag, it doesn't seem to be working properly. Anyway I've decided to point to the ser file that is 2 directories up when reporting and just move it to a specified locaiton when done generating the reports. This is a very ugly hack. I was wondering if anyone could help me find a quick and clean way to handle this such that only one file is ever generated in the proper location. Thanks in advance, -B The following is the build target: <target name="junit" description="Run All JUnit Tests" depends="remove-reports"> <!-- <property name="corbertura.file" value="cobertura.ser" /> --> <echo level="info">Deleting Corbertura SER file="${corbertura.file}</echo> <delete file="${corbertura.file}"/> <echo level="info">Deleting Instruments dir="${dir.instruments}"</echo> <delete dir="${dir.instruments}" /> <echo level="info">Making Instruments Dir="${dir.instruments}"</echo> <mkdir dir="${dir.instruments}"/> <echo level="info">Creating Instruments: datafile="${corbertura.file}" todir="${dir.instruments}" </echo> <cobertura-instrument datafile="../../${corbertura.file}" todir="${dir.instruments}"> <fileset dir="${dir.classes}"> <!-- Instrument all the application classes, but don't instrument the test classes. --> <include name="**/*.class" /> <exclude name="**/*Test.class" /> </fileset> </cobertura-instrument> <echo level="info">Running JUnit ${dir.test.classes}</echo> <junit printsummary="yes" haltonerror="${haltonerror}" fork="yes" showoutput="${showoutput}"> <classpath location="${dir.instruments}"/> <classpath location="${dir.classes}"/> <classpath refid="build_classpath"/> <jvmarg value="-Xmx${memoryValue}m"/> <batchtest todir="${dir.reports}" haltonerror="${haltonerror}" fork="yes"> <formatter type="xml"/> <fileset dir="${dir.classes}"> <include name="**/*Test*.class"/> <exclude name="**/*$*.class"/> </fileset> </batchtest> </junit> <echo level="info">Making dir="${dir.reports.artifacts}/cobertura"</echo> <mkdir dir="${dir.reports.artifacts}/cobertura"/> <cobertura-report format="html" datafile="../../${corbertura.file}" srcdir="${dir.src}" destdir="${dir.reports.artifacts}/cobertura"/> <move file="../../cobertura.ser" todir="bin/test/reports/artifacts/cobertura"/> <antcall target="archive"/> </target> _________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement |
From: THIERRY M. ROSI/S. <mar...@fr...> - 2005-06-15 11:15:18
|
Hello, I'd like to know if anybody knows about a way to instrument, through ant, all the classes of a project with one .ser for every .class? I'd like to make tests, change a class and continue the tests without having to loose all the previous tests (made using other classes). I think that with a .ser for every .class and the merging tool i'd be able to use cobertura will developing. Thanks Marc Thierry France Telecom Rosi/Sicor Marc.Thierry at francetelecom dot com |
From: Seigel, J. <Jam...@av...> - 2005-06-12 22:28:46
|
Questions for the group: 1) How many people do you feel are using the library in the NON-ant way? = Would a change in their API be acceptable? 2) In the xmlreport there is a line that looks like this: <coverage = src=3D"sourceDirectory"> that gets printed out at the top of the file. What would you want to = see in a multiple source directory format? 3) Instrumentation bug that only allows one fileset (aha! found it in = the bug reports) Would a change in the Main.class command line args be = acceptable to fix this issue? The problem for 1 & 3 Currently the way that the information is getting passed from the ant = side to the back side is through command line parameters: "--basedir bob = --datafile sherryfile srcfile1 srcfile2 srcfile3 ..." etc. This leaves = the listing of the source files without really any parent information = (i.e. what basedir do they come from if we wanted to specify multiple = base directories. =20 One could argue that if you don't find the source file in one directory = just look in another one until you find it. Well I have that approach = implemented as well. The problem with this approach is that we aren't = really taking advantage of the fileset's include and exclude = functionality then and we might as well just pass over a collection of = basedirectories and forget about listing the files at all. This is = complicated by the fact that a file with the same name and package = structure could be in multiple source directories and if someone = carefully set up their includes and excludes to pick the right one, they = might be in for a surprise if they get the other one. I believe that if we are going the fileset route then we have to tie the = sourcefile to its parent base directory and be diligent about picking = the correct file. I have implemented this approach. However, it will = take a bit of effort for the command line folks to change over to a new = way of encoding the parameters. They will have to specify a = "--sourceFile <srcDir>,<srcFile>" for each source file they wish to = include. Anyway...feedback is needed. This would be the only form supported, with no srcDir parameters, and as = many filesets as you want. If this approach is good for you guys, then = I can submit a patch for the instrument bug as well. =20 <cobertura-report destdir=3D"${coverage.html.dir}"> <fileset dir=3D"${src.dir}"> <include name=3D"**/*.java" /> </fileset> <fileset dir=3D"${test.dir}"> <include name=3D"**/*.java" /> <exclude name=3D"**/*Test.java" /> </fileset> </cobertura-report> Cheers james. P.S. I will submit the patch when I get some feedback...I feel I have = been plugging up the patch hole on sf.net with wasted efforts. |
From: Seigel, J. <Jam...@av...> - 2005-06-12 13:15:39
|
Okay, so, is this what we are looking for? <cobertura-report destdir=3D"${coverage.html.dir}"> <fileset dir=3D"${src.dir}"> <include name=3D"**/*.java" /> </fileset> <fileset dir=3D"${test.dir}"> <include name=3D"**/*.java" /> </fileset> </cobertura-report> If so, I have good news and bad news. Good news: I have a solution. Not perfect, but more complete than the = instrument solution. Bad news: Looks like the instrument version of this has a bug in it. It = might actually only work with one fileset block. (I haven't proven this = yet) Anyone interested? Or is this thread getting far too long? Cheers J |
From: Carlos S. <ca...@ap...> - 2005-06-10 16:40:58
|
Hi, I'd like to notify you that a new cobertura plugin for maven has been created in http://maven-plugins.sourceforge.net/maven-cobertura-plugin/. Any comments, help,... is greatly appreciated Regards Carlos Sanchez |
From: Mark D. <Mar...@sa...> - 2005-06-10 14:32:38
|
Cobertura should only read/write the cobertura.ser file once for each = JVM you run. The file is accessed via some static methods and = variables. The first time coverage data is accessed by the instrumented = classes, the cobertura.ser file is read in and lingers in memory. The = file is flushed back to the disk when the JVM exits. So reading/writing cobertura.ser probably isn't slowing things down too = much (unless you're starting a whole bunch of JVMs, but that has its own = performance problems...) I'm sure there are things that could be done = to improve the speed of the instrumented classes, but I haven't had a = chance to delve into the wide world of Java profiling. Patches are always welcome :-) -Mark=20 > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of Nathan Johns > Sent: Thursday, June 09, 2005 9:37 PM > To: cob...@li... > Subject: [Cobertura-devel] Performance Issues - cobertura.ser >=20 > Hi, >=20 > It appears to me, though I haven't looked at the code, that every time > the cobertura.ser file is touched by a test for instrumentation the > entire file is read in, updated and then written back to disk. This > seems to be a hug performance hit when compared to running the test > without instrumentation. (in our case about 6-7 times slower, on a > build that take 15 minutes without instrumentation this makes it a > very long build cycle.) >=20 > Would it perhaps make more sense to append instrumentation data to the > cobertura.ser file (may need to be done a different way if > cobertura.ser is a serialized object(s)) and then process all this > data at reporting time to aggregate it into class statistics? >=20 > In other words for each test, when it reads in cobertura.ser and > writes it, it creates its own data either appended or in a separate > file, and these are all then merged at reporting time. This would > reduce disk access and speed up the testing phase and move some of the > overhead to when the reporting is done. >=20 > I suppose one possibility is to make use of different cobertura.ser > files for each module and merge them at the end? Would appreciate any > comments you might have. >=20 > Nathan Johns >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far=20 > can you shotput > a projector? How fast can you ride your desk chair down the=20 > office luge track? > If you want to score the big prize, get to know the little guy. =20 > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 |
From: Nathan J. <nr...@gm...> - 2005-06-10 01:37:10
|
Hi, It appears to me, though I haven't looked at the code, that every time the cobertura.ser file is touched by a test for instrumentation the entire file is read in, updated and then written back to disk. This seems to be a hug performance hit when compared to running the test without instrumentation. (in our case about 6-7 times slower, on a build that take 15 minutes without instrumentation this makes it a very long build cycle.) Would it perhaps make more sense to append instrumentation data to the cobertura.ser file (may need to be done a different way if cobertura.ser is a serialized object(s)) and then process all this data at reporting time to aggregate it into class statistics? In other words for each test, when it reads in cobertura.ser and writes it, it creates its own data either appended or in a separate file, and these are all then merged at reporting time. This would reduce disk access and speed up the testing phase and move some of the overhead to when the reporting is done. I suppose one possibility is to make use of different cobertura.ser files for each module and merge them at the end? Would appreciate any comments you might have. Nathan Johns |
From: Czechowski, I. <Igo...@sa...> - 2005-06-07 15:39:42
|
Thanks, I thought so. But was not sure, since I got same strange errors that it's unable to find HasBeenImplemented class. But this error was not displayed before when we used version 1.2 . Igor =20 -----Original Message----- From: Mark Doliner [mailto:Mar...@sa...]=20 Sent: Tuesday, June 07, 2005 5:19 PM To: Czechowski, Igor; Cobertura-devel Subject: RE: [Cobertura-devel] Cobertura.jar required on the classpath Hasn't cobertura.jar ALWAYS been required to be on the classpath? -Mark=20 > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of Czechowski, Igor > Sent: Tuesday, June 07, 2005 11:16 AM > To: Cobertura-devel > Subject: [Cobertura-devel] Cobertura.jar required on the classpath >=20 > Hi, >=20 > Has anything changed between versions 1.2 and 1.4 that requires > cobertura.jar to be on the classpath when running junit task ? >=20 >=20 > Thanks > Igor |
From: Seigel, J. <Jam...@av...> - 2005-06-07 15:29:03
|
I will take a look at the fileset approach and see how much damage that will do to the current structure. I have a few questions for the fans however: 1) When using the fileset approach you are getting a list of files. Should the resulting source file only be loaded if it is referenced directly in this list? (probably yes)=20 2) Is it okay that the nested fileset approach doesn't really give a readable reason for why there are nested filesets with in the report block? Meaning, it isn't obvious that this is the location to specify my source files for it to chomp on. 3) When will it stop raining here in calgary? Cheers James. -----Original Message----- From: Jeremy Ryan Thomerson [mailto:je...@th...]=20 Sent: Tuesday, June 07, 2005 9:21 AM To: Mark Doliner; cob...@li... Cc: Seigel, James Subject: Re: [Cobertura-devel] Multiple Source directories I like the JAVAC approach, because like someone earlier in the thread said (Mark?), a user could copy their JAVAC task right into the report task. JT ----- Original Message -----=20 From: "Mark Doliner" <Mar...@sa...> To: <cob...@li...> Cc: "Seigel, James" <Jam...@av...> Sent: Tuesday, June 07, 2005 10:16 AM Subject: RE: [Cobertura-devel] Multiple Source directories I agree. So should we go with using nested filesets, or should we mimic javac? Here's an example of each NESTED FILESETS: <cobertura-report destdir=3D"${coverage.html.dir}"> <fileset dir=3D"${src.dir}"> <include name=3D"**/*.java" /> <exclude name=3D"**/DebuggingHelper*"/> <exclude name=3D"**/Test*"/> </fileset> <fileset dir=3D"${examples.dir}"> <include name=3D"**/*.java" /> </fileset> </cobertura-report> MIMIC JAVAC: <cobertura-report destdir=3D"${coverage.html.dir}"> <src path=3D"${src.dir}"/> <src path=3D"${examples.dir}"/> <include name=3D"net/sourceforge/cobertura/**"/>> <exclude name=3D"**/DebuggingHelper*"/> <exclude name=3D"**/Test*"/> </javac> The one reason I don't like the nested filesets is because calling it "fileset" doesn't really tell you what it's used for. Is it possible to change that to "source" or something? -Mark > -----Original Message----- > From: Jeremy Ryan Thomerson [mailto:je...@th...] > Sent: Tuesday, June 07, 2005 11:07 AM > To: J. Rentrop; Sinke, Mark (GE Healthcare) > Cc: Mark Doliner; Seigel, James; cob...@li... > Subject: Re: [Cobertura-devel] Multiple Source directories > > I had the same reservatoins. We should keep our API > (including our ant file > interface) as consistent between releases as possible, and > especially not > release something that is a public API (basically) that we > are planning on > changing soon. > > Thanks Julien! > > Jeremy ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Jeremy R. T. <je...@th...> - 2005-06-07 15:22:38
|
I like the JAVAC approach, because like someone earlier in the thread said (Mark?), a user could copy their JAVAC task right into the report task. JT ----- Original Message ----- From: "Mark Doliner" <Mar...@sa...> To: <cob...@li...> Cc: "Seigel, James" <Jam...@av...> Sent: Tuesday, June 07, 2005 10:16 AM Subject: RE: [Cobertura-devel] Multiple Source directories I agree. So should we go with using nested filesets, or should we mimic javac? Here's an example of each NESTED FILESETS: <cobertura-report destdir="${coverage.html.dir}"> <fileset dir="${src.dir}"> <include name="**/*.java" /> <exclude name="**/DebuggingHelper*"/> <exclude name="**/Test*"/> </fileset> <fileset dir="${examples.dir}"> <include name="**/*.java" /> </fileset> </cobertura-report> MIMIC JAVAC: <cobertura-report destdir="${coverage.html.dir}"> <src path="${src.dir}"/> <src path="${examples.dir}"/> <include name="net/sourceforge/cobertura/**"/>> <exclude name="**/DebuggingHelper*"/> <exclude name="**/Test*"/> </javac> The one reason I don't like the nested filesets is because calling it "fileset" doesn't really tell you what it's used for. Is it possible to change that to "source" or something? -Mark > -----Original Message----- > From: Jeremy Ryan Thomerson [mailto:je...@th...] > Sent: Tuesday, June 07, 2005 11:07 AM > To: J. Rentrop; Sinke, Mark (GE Healthcare) > Cc: Mark Doliner; Seigel, James; cob...@li... > Subject: Re: [Cobertura-devel] Multiple Source directories > > I had the same reservatoins. We should keep our API > (including our ant file > interface) as consistent between releases as possible, and > especially not > release something that is a public API (basically) that we > are planning on > changing soon. > > Thanks Julien! > > Jeremy ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Sinke, M. \(GE Healthcare\) <mar...@me...> - 2005-06-07 15:22:09
|
Ok. I give in :-). We're using the copy files trick too. That's going to be a long copy though at some point. Mark. _____ =20 "From there to here, from here to there, funny things are everywhere." - One Fish, Two Fish, Red Fish, Blue Fish, Dr. Seuss _____ =20 Mark J. Sinke Senior Software Architect/Patient Directory Team Lead GE Healthcare Information Technologies Clinical Information Technologies Core Infrastructure Platforms=20 T +31 30 692 6000 F +31 30 692 6010 D *381 6446 E mar...@me... <mailto:mar...@me...> =20 www.gehealthcare.com <http://www.gehealthcare.com>=20 -----Original Message----- From: Jeremy Ryan Thomerson [mailto:je...@th...]=20 Sent: Tuesday, June 07, 2005 17:07 To: J. Rentrop; Sinke, Mark (GE Healthcare) Cc: Mark Doliner; Seigel, James; cob...@li... Subject: Re: [Cobertura-devel] Multiple Source directories I had the same reservatoins. We should keep our API (including our ant file interface) as consistent between releases as possible, and especially not release something that is a public API (basically) that we are planning on changing soon. Thanks Julien! Jeremy ----- Original Message ----- From: "J. Rentrop" <jjb...@st...> To: "Sinke, Mark (GE Healthcare)" <mar...@me...> Cc: "Mark Doliner" <Mar...@sa...>; "Seigel, James" <Jam...@av...>; <cob...@li...> Sent: Tuesday, June 07, 2005 2:17 AM Subject: RE: [Cobertura-devel] Multiple Source directories I don't agree. If we are going to implement this solution we will have to document it and people will start using it. It will be harder to change it later because people will already be using the quick fix solution. I think it would be better to take some time to create it the good way (nested filesets). If you support nested filesets you also support references to predefined filesets which was mentioned earlyer. The quick fix for now can be to copy the src folders to one directory and reference this directory in the report task. I have used this solution in one of our projects. Example code: <mkdir dir=3D"${src.all}"/> <copy todir=3D"${src.all}"> <fileset dir=3D"PROJECT1/src"> <include name=3D"**/*.java" /> </fileset> <fileset dir=3D"PROJECT2/src"> <include name=3D"**/*.java" /> </fileset> </copy> <cobertura-report srcdir=3D"${src.all}" destdir=3D"report"/> Best regards, Julien Quoting "Sinke, Mark (GE Healthcare)" <mar...@me...>: > For now, I'd just go with source folders; the way <javac> support > <includes> or <excludes> would be a bonus, but not necessary in a first > iteration, I think. > > Mark. > > -----Original Message----- > From: cob...@li... > [mailto:cob...@li...] On Behalf Of Mark > Doliner > Sent: Monday, June 06, 2005 17:02 > To: Seigel, James; cob...@li... > Subject: RE: [Cobertura-devel] Multiple Source directories > > It seems like it would make the most sense to mimic the javac task. > Then maybe people could just copy and paste parts of javac into > cobertura.report? This would allow you to do something like the > following: > > <cobertura-report destdir=3D"${classes}"> > <src path=3D"${basedir}/src"/> > <src path=3D"${basedir}/examples"/> > <include name=3D"net/sourceforge/cobertura/**"/>> > <exclude name=3D"**/DebuggingHelper*"/> > <exclude name=3D"**/Test*"/> > </javac> > > Is there a reason we would want to do this differently than the javac > task? Would we even need to support the include and exclude elements? > > -Mark > > > -----Original Message----- > > From: cob...@li... > > [mailto:cob...@li...] On Behalf Of J. > > Rentrop > > Sent: Sunday, June 05, 2005 11:49 AM > > To: Seigel, James > > Cc: cob...@li... > > Subject: Re: [Cobertura-devel] Multiple Source directories > > > > Hi, > > > > I think nested filesets would probally be the best. This is similiair > > to the instrument task. > > > > Example: > > <cobertura-report destdir=3D"${coverage.html.dir}"> > > <fileset dir=3D"${src.dir}"> > > <include name=3D"**/*.java" /> > > </fileset> > > <fileset dir=3D"${test.dir}"> > > <include name=3D"**/*.java" /> > > </fileset> > > </cobertura-report> > > > > Best regards, > > Julien > > > > Quoting "Seigel, James" <Jam...@av...>: > > > > > > > > Hello, > > > > > > Sorry for the hiatus. I was wondering if anyone had any > > thoughts on the > > > format to support multiple source directories on the > > coverage-report task? > > > > > > What do you think of this kind of structure? > > > > > > <cobertura-report = destdir=3D"${coverage.html.dir}"> > > > <sourcepath location=3D"${src.dir}"/> > > > <sourcepath location=3D"${test.dir}"/> > > > </cobertura-report> > > > > > > > > > Cheers > > > James. > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: NEC IT Guy Games. How > > far can you > > > shotput > > > a projector? How fast can you ride your desk chair down the > > office luge > > > track? > > > If you want to score the big prize, get to know the little guy. > > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > > > _______________________________________________ > > > Cobertura-devel mailing list > > > Cob...@li... > > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > > shotput a projector? How fast can you ride your desk chair down the > > office luge track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: = http://www.necitguy.com/?r=3D20 > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Mark D. <Mar...@sa...> - 2005-06-07 15:19:11
|
Hasn't cobertura.jar ALWAYS been required to be on the classpath? -Mark=20 > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of Czechowski, Igor > Sent: Tuesday, June 07, 2005 11:16 AM > To: Cobertura-devel > Subject: [Cobertura-devel] Cobertura.jar required on the classpath >=20 > Hi, >=20 > Has anything changed between versions 1.2 and 1.4 that requires > cobertura.jar to be on the classpath when running junit task ? >=20 >=20 > Thanks > Igor |
From: Mark D. <Mar...@sa...> - 2005-06-07 15:16:50
|
I agree. So should we go with using nested filesets, or should we mimic = javac? Here's an example of each NESTED FILESETS: <cobertura-report destdir=3D"${coverage.html.dir}"> <fileset dir=3D"${src.dir}"> <include name=3D"**/*.java" /> <exclude name=3D"**/DebuggingHelper*"/> <exclude name=3D"**/Test*"/> </fileset> <fileset dir=3D"${examples.dir}"> <include name=3D"**/*.java" /> </fileset> </cobertura-report> MIMIC JAVAC: <cobertura-report destdir=3D"${coverage.html.dir}"> <src path=3D"${src.dir}"/> <src path=3D"${examples.dir}"/> <include name=3D"net/sourceforge/cobertura/**"/>> <exclude name=3D"**/DebuggingHelper*"/> <exclude name=3D"**/Test*"/> </javac> The one reason I don't like the nested filesets is because calling it = "fileset" doesn't really tell you what it's used for. Is it possible to = change that to "source" or something? -Mark > -----Original Message----- > From: Jeremy Ryan Thomerson [mailto:je...@th...]=20 > Sent: Tuesday, June 07, 2005 11:07 AM > To: J. Rentrop; Sinke, Mark (GE Healthcare) > Cc: Mark Doliner; Seigel, James; cob...@li... > Subject: Re: [Cobertura-devel] Multiple Source directories >=20 > I had the same reservatoins. We should keep our API=20 > (including our ant file > interface) as consistent between releases as possible, and=20 > especially not > release something that is a public API (basically) that we=20 > are planning on > changing soon. >=20 > Thanks Julien! >=20 > Jeremy |
From: Czechowski, I. <Igo...@sa...> - 2005-06-07 15:16:39
|
Hi, Has anything changed between versions 1.2 and 1.4 that requires cobertura.jar to be on the classpath when running junit task ? Thanks Igor |
From: Jeremy R. T. <je...@th...> - 2005-06-07 15:07:33
|
I had the same reservatoins. We should keep our API (including our ant file interface) as consistent between releases as possible, and especially not release something that is a public API (basically) that we are planning on changing soon. Thanks Julien! Jeremy ----- Original Message ----- From: "J. Rentrop" <jjb...@st...> To: "Sinke, Mark (GE Healthcare)" <mar...@me...> Cc: "Mark Doliner" <Mar...@sa...>; "Seigel, James" <Jam...@av...>; <cob...@li...> Sent: Tuesday, June 07, 2005 2:17 AM Subject: RE: [Cobertura-devel] Multiple Source directories I don't agree. If we are going to implement this solution we will have to document it and people will start using it. It will be harder to change it later because people will already be using the quick fix solution. I think it would be better to take some time to create it the good way (nested filesets). If you support nested filesets you also support references to predefined filesets which was mentioned earlyer. The quick fix for now can be to copy the src folders to one directory and reference this directory in the report task. I have used this solution in one of our projects. Example code: <mkdir dir="${src.all}"/> <copy todir="${src.all}"> <fileset dir="PROJECT1/src"> <include name="**/*.java" /> </fileset> <fileset dir="PROJECT2/src"> <include name="**/*.java" /> </fileset> </copy> <cobertura-report srcdir="${src.all}" destdir="report"/> Best regards, Julien Quoting "Sinke, Mark (GE Healthcare)" <mar...@me...>: > For now, I'd just go with source folders; the way <javac> support > <includes> or <excludes> would be a bonus, but not necessary in a first > iteration, I think. > > Mark. > > -----Original Message----- > From: cob...@li... > [mailto:cob...@li...] On Behalf Of Mark > Doliner > Sent: Monday, June 06, 2005 17:02 > To: Seigel, James; cob...@li... > Subject: RE: [Cobertura-devel] Multiple Source directories > > It seems like it would make the most sense to mimic the javac task. > Then maybe people could just copy and paste parts of javac into > cobertura.report? This would allow you to do something like the > following: > > <cobertura-report destdir="${classes}"> > <src path="${basedir}/src"/> > <src path="${basedir}/examples"/> > <include name="net/sourceforge/cobertura/**"/>> > <exclude name="**/DebuggingHelper*"/> > <exclude name="**/Test*"/> > </javac> > > Is there a reason we would want to do this differently than the javac > task? Would we even need to support the include and exclude elements? > > -Mark > > > -----Original Message----- > > From: cob...@li... > > [mailto:cob...@li...] On Behalf Of J. > > Rentrop > > Sent: Sunday, June 05, 2005 11:49 AM > > To: Seigel, James > > Cc: cob...@li... > > Subject: Re: [Cobertura-devel] Multiple Source directories > > > > Hi, > > > > I think nested filesets would probally be the best. This is similiair > > to the instrument task. > > > > Example: > > <cobertura-report destdir="${coverage.html.dir}"> > > <fileset dir="${src.dir}"> > > <include name="**/*.java" /> > > </fileset> > > <fileset dir="${test.dir}"> > > <include name="**/*.java" /> > > </fileset> > > </cobertura-report> > > > > Best regards, > > Julien > > > > Quoting "Seigel, James" <Jam...@av...>: > > > > > > > > Hello, > > > > > > Sorry for the hiatus. I was wondering if anyone had any > > thoughts on the > > > format to support multiple source directories on the > > coverage-report task? > > > > > > What do you think of this kind of structure? > > > > > > <cobertura-report destdir="${coverage.html.dir}"> > > > <sourcepath location="${src.dir}"/> > > > <sourcepath location="${test.dir}"/> > > > </cobertura-report> > > > > > > > > > Cheers > > > James. > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: NEC IT Guy Games. How > > far can you > > > shotput > > > a projector? How fast can you ride your desk chair down the > > office luge > > > track? > > > If you want to score the big prize, get to know the little guy. > > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > > > _______________________________________________ > > > Cobertura-devel mailing list > > > Cob...@li... > > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > > shotput a projector? How fast can you ride your desk chair down the > > office luge track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: J. R. <jjb...@st...> - 2005-06-07 07:22:46
|
I don't agree. If we are going to implement this solution we will have to document it and people will start using it. It will be harder to change it later because people will already be using the quick fix solution. I think it would be better to take some time to create it the good way (nested filesets). If you support nested filesets you also support references to predefined filesets which was mentioned earlyer. The quick fix for now can be to copy the src folders to one directory and reference this directory in the report task. I have used this solution in one of our projects. Example code: <mkdir dir="${src.all}"/> <copy todir="${src.all}"> <fileset dir="PROJECT1/src"> <include name="**/*.java" /> </fileset> <fileset dir="PROJECT2/src"> <include name="**/*.java" /> </fileset> </copy> <cobertura-report srcdir="${src.all}" destdir="report"/> Best regards, Julien Quoting "Sinke, Mark (GE Healthcare)" <mar...@me...>: > For now, I'd just go with source folders; the way <javac> support > <includes> or <excludes> would be a bonus, but not necessary in a first > iteration, I think. > > Mark. > > -----Original Message----- > From: cob...@li... > [mailto:cob...@li...] On Behalf Of Mark > Doliner > Sent: Monday, June 06, 2005 17:02 > To: Seigel, James; cob...@li... > Subject: RE: [Cobertura-devel] Multiple Source directories > > It seems like it would make the most sense to mimic the javac task. > Then maybe people could just copy and paste parts of javac into > cobertura.report? This would allow you to do something like the > following: > > <cobertura-report destdir="${classes}"> > <src path="${basedir}/src"/> > <src path="${basedir}/examples"/> > <include name="net/sourceforge/cobertura/**"/>> > <exclude name="**/DebuggingHelper*"/> > <exclude name="**/Test*"/> > </javac> > > Is there a reason we would want to do this differently than the javac > task? Would we even need to support the include and exclude elements? > > -Mark > > > -----Original Message----- > > From: cob...@li... > > [mailto:cob...@li...] On Behalf Of J. > > Rentrop > > Sent: Sunday, June 05, 2005 11:49 AM > > To: Seigel, James > > Cc: cob...@li... > > Subject: Re: [Cobertura-devel] Multiple Source directories > > > > Hi, > > > > I think nested filesets would probally be the best. This is similiair > > to the instrument task. > > > > Example: > > <cobertura-report destdir="${coverage.html.dir}"> > > <fileset dir="${src.dir}"> > > <include name="**/*.java" /> > > </fileset> > > <fileset dir="${test.dir}"> > > <include name="**/*.java" /> > > </fileset> > > </cobertura-report> > > > > Best regards, > > Julien > > > > Quoting "Seigel, James" <Jam...@av...>: > > > > > > > > Hello, > > > > > > Sorry for the hiatus. I was wondering if anyone had any > > thoughts on the > > > format to support multiple source directories on the > > coverage-report task? > > > > > > What do you think of this kind of structure? > > > > > > <cobertura-report destdir="${coverage.html.dir}"> > > > <sourcepath location="${src.dir}"/> > > > <sourcepath location="${test.dir}"/> > > > </cobertura-report> > > > > > > > > > Cheers > > > James. > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: NEC IT Guy Games. How > > far can you > > > shotput > > > a projector? How fast can you ride your desk chair down the > > office luge > > > track? > > > If you want to score the big prize, get to know the little guy. > > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > > > _______________________________________________ > > > Cobertura-devel mailing list > > > Cob...@li... > > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > > shotput a projector? How fast can you ride your desk chair down the > > office luge track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > |
From: Seigel, J. <Jam...@av...> - 2005-06-07 03:56:55
|
So here is a patch against the latest cvs repository. I hadn't updated = my local repository in a while so it took longer than expected. I will = post it on the sf site as well. Give 'er a rip. The test files are = posted on the sf.net site already so I won't repost them. If this gets = applied, I will try and clean up the code some more and add more test = cases. Here is the format to use in your ant file... <cobertura-report destdir=3D"${coverage.html.dir}"> <src path=3D"${src.dir.one}"/> <src path=3D"${src.dir.two}"/> <src path=3D"${src.dir.three}"/> </cobertura-report> ? test/net/sourceforge/cobertura/reporting/MainTest.java ? test/net/sourceforge/cobertura/reporting/html/HTMLReportTest.java Index: src/net/sourceforge/cobertura/ant/ReportTask.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: = /cvsroot/cobertura/cobertura/src/net/sourceforge/cobertura/ant/ReportTask= .java,v retrieving revision 1.4 diff -u -d -p -r1.4 ReportTask.java --- src/net/sourceforge/cobertura/ant/ReportTask.java 29 Apr 2005 = 20:20:16 -0000 1.4 +++ src/net/sourceforge/cobertura/ant/ReportTask.java 7 Jun 2005 = 03:44:12 -0000 @@ -59,6 +59,8 @@ package net.sourceforge.cobertura.ant; import java.io.File; import java.net.URL; import java.net.URLClassLoader; +import java.util.Iterator; +import java.util.Vector; =20 import net.sourceforge.cobertura.util.Header; import net.sourceforge.cobertura.util.StringUtil; @@ -70,6 +72,7 @@ import org.apache.tools.ant.taskdefs.Mat import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; =20 + /** * Generate a coverage report based on coverage data generated=20 * by instrumented classes. @@ -79,10 +82,10 @@ public class ReportTask extends Matching =20 private String dataFile =3D null; private String format =3D "html"; - private Path src; private File destDir; =20 private Java java =3D null; + private Vector sourcePaths =3D new Vector(); =20 public void setDataFile(String dataFile) { @@ -101,14 +104,8 @@ public class ReportTask extends Matching =20 public void setSrcDir(Path srcDir) { - if (src =3D=3D null) - { - src =3D srcDir; - } - else - { - src.append(srcDir); - } + // support legacy + createSrc().setPath(srcDir.toString()); } =20 public void execute() throws BuildException @@ -126,9 +123,13 @@ public class ReportTask extends Matching =20 getJava().createArg().setValue("--destination"); getJava().createArg().setValue(destDir.toString()); - - getJava().createArg().setValue("--source"); - getJava().createArg().setValue(src.toString()); + =09 + Iterator pathIterator =3D sourcePaths.iterator(); + while (pathIterator.hasNext()) { + Src path =3D (Src) pathIterator.next(); + getJava().createArg().setValue("--source"); + getJava().createArg().setValue(path.path()); + } =20 if (getJava().executeJava() !=3D 0) { @@ -182,5 +183,23 @@ public class ReportTask extends Matching { createClasspath().setRefid(r); } +=09 + public Src createSrc() { + Src sourcePath =3D new Src(); + sourcePaths.add(sourcePath); + return sourcePath; + } +=09 + public static class Src { + private String sourcePath; + + public String path() { + return sourcePath; + } + + public void setPath(String aPath) { + sourcePath =3D aPath; + } + } =20 } Index: src/net/sourceforge/cobertura/reporting/Main.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: = /cvsroot/cobertura/cobertura/src/net/sourceforge/cobertura/reporting/Main= .java,v retrieving revision 1.13 diff -u -d -p -r1.13 Main.java --- src/net/sourceforge/cobertura/reporting/Main.java 2 Jun 2005 = 17:40:50 -0000 1.13 +++ src/net/sourceforge/cobertura/reporting/Main.java 7 Jun 2005 = 03:44:12 -0000 @@ -26,6 +26,8 @@ import gnu.getopt.Getopt; import gnu.getopt.LongOpt; =20 import java.io.File; +import java.io.IOException; +import java.util.StringTokenizer; =20 import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler; import net.sourceforge.cobertura.coveragedata.ProjectData; @@ -39,18 +41,15 @@ public class Main =20 private static final Logger logger =3D Logger.getLogger(Main.class); =20 - // TODO: make these not static? - static String format =3D "html"; - static File dataFile =3D null; - static File destinationDir =3D null; - static File sourceDir =3D null; - - public static void main(String[] args) throws Exception - { + public static void main(String[] args) throws Exception { + String format =3D "html"; + File dataFile =3D null; + File destinationDir =3D null; + File sourceDir[] =3D null; long startTime =3D System.currentTimeMillis(); =20 LongOpt[] longOpts =3D new LongOpt[4]; - // TODO: Allow for multiple destination and multiple source = directories + =09 longOpts[0] =3D new LongOpt("format", LongOpt.REQUIRED_ARGUMENT, = null, 'f'); longOpts[1] =3D new LongOpt("datafile", LongOpt.REQUIRED_ARGUMENT, @@ -62,6 +61,7 @@ public class Main =20 Getopt g =3D new Getopt(Main.class.getName(), args, ":f:d:o:s:", longOpts); + StringBuffer sourceDirBuffer =3D null; int c; while ((c =3D g.getopt()) !=3D -1) { @@ -112,23 +112,44 @@ public class Main break; =20 case 's': - sourceDir =3D new File(g.getOptarg()); - if (!sourceDir.exists()) - { - System.err.println("Error: source directory " - + sourceDir + " does not exist"); - System.exit(1); - } - if (!sourceDir.isDirectory()) - { - System.err.println("Error: source directory " - + sourceDir + " must be a directory"); - System.exit(1); + if (sourceDirBuffer =3D=3D null) { + sourceDirBuffer =3D new StringBuffer(); + sourceDirBuffer.append(g.getOptarg()); + } else { + sourceDirBuffer.append(";"); + sourceDirBuffer.append(g.getOptarg()); } break; } } + sourceDir =3D parseSourceDirectory(sourceDirBuffer.toString()); + performCoverage(format, dataFile, destinationDir, sourceDir); + + long stopTime =3D System.currentTimeMillis(); + System.out.println("Reporting time: " + (stopTime - startTime) + = "ms"); + } + + protected static File[] parseSourceDirectory(String = sourceDirectoryString) { + File[] sourceDir; + StringTokenizer stringTokenizer =3D new = StringTokenizer(sourceDirectoryString, ";"); + sourceDir =3D new File[stringTokenizer.countTokens()]; + int i =3D 0; + while (stringTokenizer.hasMoreTokens()) { + sourceDir[i] =3D new File(stringTokenizer.nextToken()); + if (!sourceDir[i].exists()) { + System.err.println("Error: source directory " + sourceDir[i] + " = does not exist"); + System.exit(1); + } + if (!sourceDir[i].isDirectory()) { + System.err.println("Error: source directory " + sourceDir[i] + " = must be a directory"); + System.exit(1); + } + i++; + } + return sourceDir; + } =20 + protected static void performCoverage(String format, File dataFile, = File destinationDir, File[] sourceDir) throws Exception, IOException { if (dataFile =3D=3D null) dataFile =3D CoverageDataFileHandler.getDefaultDataFile(); =20 @@ -150,7 +171,7 @@ public class Main logger.debug("dataFile is " + dataFile.getAbsolutePath()); logger.debug("destinationDir is " + destinationDir.getAbsolutePath()); - logger.debug("sourceDir is " + sourceDir.getAbsolutePath()); + // logger.debug("sourceDir is " + sourceDir.getAbsolutePath()); } =20 ProjectData projectData =3D CoverageDataFileHandler @@ -170,10 +191,6 @@ public class Main { new XMLReport(projectData, destinationDir, sourceDir); } - - long stopTime =3D System.currentTimeMillis(); - System.out - .println("Reporting time: " + (stopTime - startTime) + "ms"); } =20 } Index: src/net/sourceforge/cobertura/reporting/html/HTMLReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: = /cvsroot/cobertura/cobertura/src/net/sourceforge/cobertura/reporting/html= /HTMLReport.java,v retrieving revision 1.25 diff -u -d -p -r1.25 HTMLReport.java --- src/net/sourceforge/cobertura/reporting/html/HTMLReport.java 31 May = 2005 19:18:59 -0000 1.25 +++ src/net/sourceforge/cobertura/reporting/html/HTMLReport.java 7 Jun = 2005 03:44:12 -0000 @@ -52,14 +52,14 @@ public class HTMLReport =20 private File destinationDir; =20 - private File sourceDir; + File sourceDir[]; =20 private ProjectData projectData; =20 /** * Create a coverage report */ - public HTMLReport(ProjectData projectData, File outputDir, File = sourceDir) + public HTMLReport(ProjectData projectData, File outputDir, File[] = sourceDir) throws Exception { this.destinationDir =3D outputDir; @@ -73,6 +73,9 @@ public class HTMLReport generateSourceFiles(); } =20 + protected HTMLReport() { + } + private String generatePackageName(PackageData packageData) { if (packageData.getName().equals("")) @@ -448,8 +451,7 @@ public class HTMLReport BufferedReader br =3D null; try { - File sourceFile =3D new File(sourceDir, sourceFileData - .getName()); + File sourceFile =3D sourceFileForName(sourceFileData.getName()); br =3D new BufferedReader(new FileReader(sourceFile)); String lineStr; JavaToHtml javaToHtml =3D new JavaToHtml(); @@ -525,6 +527,16 @@ public class HTMLReport } } =20 + protected File sourceFileForName(String sourceFileName) { + File file =3D null; + for (int i =3D 0; i < sourceDir.length; i++) { + file =3D new File(sourceDir[i], sourceFileName); + if (file.exists()) + return file; + } + return file; + } + private static String generateTableHeader(String title, boolean showColumnForNumberOfClasses) { @@ -640,7 +652,7 @@ public class HTMLReport StringBuffer ret =3D new StringBuffer(); double lineCoverage =3D -1; double branchCoverage =3D -1; - double ccn =3D Util.getCCN(sourceDir, true); + double ccn =3D averageCCN(); =20 if (projectData.getNumberOfValidLines() > 0) lineCoverage =3D projectData.getLineCoverageRate(); @@ -657,6 +669,14 @@ public class HTMLReport return ret.toString(); } =20 + private double averageCCN() { + double accumulator =3D 0; + for (int i =3D 0; i < sourceDir.length; i++) { + accumulator +=3D Util.getCCN(sourceDir[i], true); + } + return accumulator/sourceDir.length; + } + private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret =3D new StringBuffer(); @@ -664,8 +684,7 @@ public class HTMLReport String url2 =3D "frame-sourcefiles-" + packageData.getName() + = ".html"; double lineCoverage =3D -1; double branchCoverage =3D -1; - double ccn =3D Util.getCCN(new File(sourceDir, packageData - .getSourceFileName()), false); + double ccn =3D = Util.getCCN(sourceFileForName(packageData.getSourceFileName()), false); =20 if (packageData.getNumberOfValidLines() > 0) lineCoverage =3D packageData.getLineCoverageRate(); @@ -689,8 +708,7 @@ public class HTMLReport StringBuffer ret =3D new StringBuffer(); double lineCoverage =3D -1; double branchCoverage =3D -1; - double ccn =3D Util.getCCN( - new File(sourceDir, sourceFileData.getName()), false); + double ccn =3D = Util.getCCN(sourceFileForName(sourceFileData.getName()), false); =20 if (sourceFileData.getNumberOfValidLines() > 0) lineCoverage =3D sourceFileData.getLineCoverageRate(); Index: src/net/sourceforge/cobertura/reporting/xml/XMLReport.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: = /cvsroot/cobertura/cobertura/src/net/sourceforge/cobertura/reporting/xml/= XMLReport.java,v retrieving revision 1.21 diff -u -d -p -r1.21 XMLReport.java --- src/net/sourceforge/cobertura/reporting/xml/XMLReport.java 25 May = 2005 14:31:37 -0000 1.21 +++ src/net/sourceforge/cobertura/reporting/xml/XMLReport.java 7 Jun = 2005 03:44:12 -0000 @@ -51,10 +51,10 @@ public class XMLReport =20 private int indent =3D 0; =20 - private File sourceDirectory; + private File sourceDirectory[]; =20 public XMLReport(ProjectData projectData, File destinationDir, - File sourceDirectory) throws IOException + File[] sourceDirectory) throws IOException { this.sourceDirectory =3D sourceDirectory; =20 @@ -134,8 +134,7 @@ public class XMLReport { logger.debug("Dumping package " + packageData.getName()); =20 - double ccn =3D Util.getCCN(new File(sourceDirectory, packageData - .getSourceFileName()), false); + double ccn =3D = Util.getCCN(sourceFileForName(packageData.getSourceFileName()), false); println("<package name=3D\"" + packageData.getName() + "\" line-rate=3D\"" + packageData.getLineCoverageRate() + "\" branch-rate=3D\"" + packageData.getBranchCoverageRate() @@ -174,8 +173,7 @@ public class XMLReport { logger.debug("Dumping class " + classData.getName()); =20 - double ccn =3D Util.getCCN(new File(sourceDirectory, classData - .getSourceFileName()), false); + double ccn =3D = Util.getCCN(sourceFileForName(classData.getSourceFileName()), false); println("<class name=3D\"" + classData.getName() + "\" filename=3D\"" + classData.getSourceFileName() + "\" line-rate=3D\"" + classData.getLineCoverageRate() + "\" branch-rate=3D\"" @@ -190,6 +188,16 @@ public class XMLReport println("</class>"); } =20 + protected File sourceFileForName(String sourceFileName) { + File file =3D null; + for (int i =3D 0; i < sourceDirectory.length; i++) { + file =3D new File(sourceDirectory[i], sourceFileName); + if (file.exists()) + return file; + } + return file; + } + private void dumpMethods(ClassData classData) { println("<methods>"); |
From: <fre...@bn...> - 2005-06-06 17:50:05
|
Hi, I'm currently working on test coverages, and i really want to use Cobertura. Using Maven, I found maven-cobertura-plugin-1.3.3 and tried it. The thing is, it doesn't work with me, and I'm looking for the reason. Even if the result of building my project with "maven cobertura" command, the result will always be "BUILD SUCCESSFUL", but there's no report. Only a frameset with one line telling 100% for a package with no name (!?) Do you have clues ? Regards, Fred. This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. |
From: Sinke, M. \(GE Healthcare\) <mar...@me...> - 2005-06-06 15:10:09
|
For now, I'd just go with source folders; the way <javac> support <includes> or <excludes> would be a bonus, but not necessary in a first iteration, I think. Mark. -----Original Message----- From: cob...@li... [mailto:cob...@li...] On Behalf Of Mark Doliner Sent: Monday, June 06, 2005 17:02 To: Seigel, James; cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories It seems like it would make the most sense to mimic the javac task. Then maybe people could just copy and paste parts of javac into cobertura.report? This would allow you to do something like the following: <cobertura-report destdir=3D"${classes}"> <src path=3D"${basedir}/src"/> <src path=3D"${basedir}/examples"/> <include name=3D"net/sourceforge/cobertura/**"/>> <exclude name=3D"**/DebuggingHelper*"/> <exclude name=3D"**/Test*"/> </javac> Is there a reason we would want to do this differently than the javac task? Would we even need to support the include and exclude elements? -Mark > -----Original Message----- > From: cob...@li... > [mailto:cob...@li...] On Behalf Of J.=20 > Rentrop > Sent: Sunday, June 05, 2005 11:49 AM > To: Seigel, James > Cc: cob...@li... > Subject: Re: [Cobertura-devel] Multiple Source directories >=20 > Hi, >=20 > I think nested filesets would probally be the best. This is similiair=20 > to the instrument task. >=20 > Example: > <cobertura-report destdir=3D"${coverage.html.dir}"> > <fileset dir=3D"${src.dir}"> > <include name=3D"**/*.java" /> > </fileset> > <fileset dir=3D"${test.dir}"> > <include name=3D"**/*.java" /> > </fileset> > </cobertura-report> >=20 > Best regards, > Julien >=20 > Quoting "Seigel, James" <Jam...@av...>: >=20 > >=20 > > Hello, > >=20 > > Sorry for the hiatus. I was wondering if anyone had any > thoughts on the > > format to support multiple source directories on the > coverage-report task? > >=20 > > What do you think of this kind of structure? > >=20 > > <cobertura-report destdir=3D"${coverage.html.dir}"> > > <sourcepath location=3D"${src.dir}"/> > > <sourcepath location=3D"${test.dir}"/> > > </cobertura-report> > >=20 > >=20 > > Cheers > > James. > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How > far can you > > shotput > > a projector? How fast can you ride your desk chair down the > office luge > > track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you=20 > shotput a projector? How fast can you ride your desk chair down the=20 > office luge track? > If you want to score the big prize, get to know the little guy. =20 > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 = > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. =20 Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ Cobertura-devel mailing list Cob...@li... https://lists.sourceforge.net/lists/listinfo/cobertura-devel |
From: Sinke, M. \(GE Healthcare\) <mar...@me...> - 2005-06-06 15:07:41
|
I would be happy with a quick fix - given only the classes in the .ser file get referenced. We could list it as experimental for the first release to gather some community feedback. And only then stabilize on the javac or the more general approach. In fact separating out the test packages should be and XSLT on the XML output. If only the HTML output could take the XML version and transform it. Well, something to work on in more spare hours :-) Mark. -----Original Message----- From: Seigel, James [mailto:Jam...@av...]=20 Sent: Monday, June 06, 2005 17:01 To: Sinke, Mark (GE Healthcare); Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories I hear what you are saying. The plumbing as it exists right now isn't really set up for that, so ultimately we could get there for sure, with some work. If you poke around in the code, there is no worry about including test source if you don't want it included because only the files that have been instrumented will be pulled in to the report. The way it works is if the file is referenced in the .ser then it looks in the srcDir (or source directories post-patch) for the file quite efficiently.... uses package name and class name to pinpoint the file under the directory... I don't know what kind of impact generating a list of files that may or may not be ultimately used and then searching through the list each time to find them might have, but it is worth a look. Especially if you could re-use the same srcpath you use for instrumenting, only having to specify it once for both reports.... Anyhoo.... Your call(s)...I am just your humble coding monkey... Let me know if you guys want to see the patch this evening or not...if not I will investigate this other solution and see if I can get a patch for it in the next couple of weeks. -----Original Message----- From: Sinke, Mark (GE Healthcare) [mailto:mar...@me...] Sent: Monday, June 06, 2005 8:49 AM To: Seigel, James; Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories In an ultimate situation, I'd like to write <path id=3D"srcpath" dir=3D"src"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <cobertura-report destdir=3D"${coverage.html.dir}"> <sourcepath refid=3D"srcpath"/> </cobertura-report>=20 To avoid generating reports for test classes. This would automatically get you the possibility to include multiple source directories, as in: <path id=3D"srcpath" dir=3D"src"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <path id=3D"src-generatedpath" dir=3D"src-generated"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <path id=3D"allsrcpath"> <path refid=3D"srcpath"/> <path refid=3D"src-generatedpath"/> </path> <cobertura-report destdir=3D"${coverage.html.dir}"> <sourcepath refid=3D"srcpath"/> </cobertura-report> This way we only need one path reference by the way, because the path can refer to multiple sub-paths Mark Sinke. -----Original Message----- From: Seigel, James [mailto:Jam...@av...] Sent: Monday, June 06, 2005 16:30 To: Sinke, Mark (GE Healthcare); Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories Well I have this one implemented... > <cobertura-report destdir=3D"${coverage.html.dir}"> > <sourcepath location=3D"${src.dir}"/> > <sourcepath location=3D"${test.dir}"/> > </cobertura-report> Where you can add as many sourcepath elements as you would like. I was modelling it after how you can specify <classpath> entries for <javac>. It will also support the srcDir attribute for legacy support. I just don't know if I am happy with the names sourcepath or location...but they aren't too too bad I guess. I could post some diffs tonight if you guys are interested.... Cheers James. -----Original Message----- From: Sinke, Mark (GE Healthcare) [mailto:mar...@me...] Sent: Monday, June 06, 2005 8:27 AM To: Seigel, James; Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories That would be the ultimate solution; for now, I'd die for just a way to mention multiple folders... Mark.=20 |
From: Mark D. <Mar...@sa...> - 2005-06-06 15:02:36
|
It seems like it would make the most sense to mimic the javac task. = Then maybe people could just copy and paste parts of javac into = cobertura.report? This would allow you to do something like the = following: <cobertura-report destdir=3D"${classes}"> <src path=3D"${basedir}/src"/> <src path=3D"${basedir}/examples"/> <include name=3D"net/sourceforge/cobertura/**"/>> <exclude name=3D"**/DebuggingHelper*"/> <exclude name=3D"**/Test*"/> </javac> Is there a reason we would want to do this differently than the javac = task? Would we even need to support the include and exclude elements? -Mark > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of J. Rentrop > Sent: Sunday, June 05, 2005 11:49 AM > To: Seigel, James > Cc: cob...@li... > Subject: Re: [Cobertura-devel] Multiple Source directories >=20 > Hi, >=20 > I think nested filesets would probally be the best. This is=20 > similiair to the > instrument task. >=20 > Example: > <cobertura-report destdir=3D"${coverage.html.dir}"> > <fileset dir=3D"${src.dir}"> > <include name=3D"**/*.java" /> > </fileset> > <fileset dir=3D"${test.dir}"> > <include name=3D"**/*.java" /> > </fileset> > </cobertura-report> >=20 > Best regards, > Julien >=20 > Quoting "Seigel, James" <Jam...@av...>: >=20 > >=20 > > Hello, > >=20 > > Sorry for the hiatus. I was wondering if anyone had any=20 > thoughts on the > > format to support multiple source directories on the=20 > coverage-report task? > >=20 > > What do you think of this kind of structure? > >=20 > > <cobertura-report destdir=3D"${coverage.html.dir}"> > > <sourcepath location=3D"${src.dir}"/> > > <sourcepath location=3D"${test.dir}"/> > > </cobertura-report> > >=20 > >=20 > > Cheers > > James. > >=20 > >=20 > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How=20 > far can you > > shotput > > a projector? How fast can you ride your desk chair down the=20 > office luge > > track? > > If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Cobertura-devel mailing list > > Cob...@li... > > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far=20 > can you shotput > a projector? How fast can you ride your desk chair down the=20 > office luge track? > If you want to score the big prize, get to know the little guy. =20 > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20 > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 |
From: Seigel, J. <Jam...@av...> - 2005-06-06 15:01:01
|
I hear what you are saying. The plumbing as it exists right now isn't really set up for that, so ultimately we could get there for sure, with some work. If you poke around in the code, there is no worry about including test source if you don't want it included because only the files that have been instrumented will be pulled in to the report. The way it works is if the file is referenced in the .ser then it looks in the srcDir (or source directories post-patch) for the file quite efficiently.... uses package name and class name to pinpoint the file under the directory... I don't know what kind of impact generating a list of files that may or may not be ultimately used and then searching through the list each time to find them might have, but it is worth a look. Especially if you could re-use the same srcpath you use for instrumenting, only having to specify it once for both reports.... Anyhoo.... Your call(s)...I am just your humble coding monkey... Let me know if you guys want to see the patch this evening or not...if not I will investigate this other solution and see if I can get a patch for it in the next couple of weeks. -----Original Message----- From: Sinke, Mark (GE Healthcare) [mailto:mar...@me...]=20 Sent: Monday, June 06, 2005 8:49 AM To: Seigel, James; Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories In an ultimate situation, I'd like to write <path id=3D"srcpath" dir=3D"src"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <cobertura-report destdir=3D"${coverage.html.dir}"> <sourcepath refid=3D"srcpath"/> </cobertura-report>=20 To avoid generating reports for test classes. This would automatically get you the possibility to include multiple source directories, as in: <path id=3D"srcpath" dir=3D"src"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <path id=3D"src-generatedpath" dir=3D"src-generated"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <path id=3D"allsrcpath"> <path refid=3D"srcpath"/> <path refid=3D"src-generatedpath"/> </path> <cobertura-report destdir=3D"${coverage.html.dir}"> <sourcepath refid=3D"srcpath"/> </cobertura-report> This way we only need one path reference by the way, because the path can refer to multiple sub-paths Mark Sinke. -----Original Message----- From: Seigel, James [mailto:Jam...@av...]=20 Sent: Monday, June 06, 2005 16:30 To: Sinke, Mark (GE Healthcare); Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories Well I have this one implemented... > <cobertura-report destdir=3D"${coverage.html.dir}"> > <sourcepath location=3D"${src.dir}"/> > <sourcepath location=3D"${test.dir}"/> > </cobertura-report> Where you can add as many sourcepath elements as you would like. I was modelling it after how you can specify <classpath> entries for <javac>. It will also support the srcDir attribute for legacy support. I just don't know if I am happy with the names sourcepath or location...but they aren't too too bad I guess. I could post some diffs tonight if you guys are interested.... Cheers James. -----Original Message----- From: Sinke, Mark (GE Healthcare) [mailto:mar...@me...] Sent: Monday, June 06, 2005 8:27 AM To: Seigel, James; Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories That would be the ultimate solution; for now, I'd die for just a way to mention multiple folders... Mark.=20 |
From: Sinke, M. \(GE Healthcare\) <mar...@me...> - 2005-06-06 14:47:05
|
In an ultimate situation, I'd like to write <path id=3D"srcpath" dir=3D"src"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <cobertura-report destdir=3D"${coverage.html.dir}"> <sourcepath refid=3D"srcpath"/> </cobertura-report>=20 To avoid generating reports for test classes. This would automatically get you the possibility to include multiple source directories, as in: <path id=3D"srcpath" dir=3D"src"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <path id=3D"src-generatedpath" dir=3D"src-generated"> <includes name=3D"*.java"/> <excludes name=3D"**/test/*"/> </path> <path id=3D"allsrcpath"> <path refid=3D"srcpath"/> <path refid=3D"src-generatedpath"/> </path> <cobertura-report destdir=3D"${coverage.html.dir}"> <sourcepath refid=3D"srcpath"/> </cobertura-report> This way we only need one path reference by the way, because the path can refer to multiple sub-paths Mark Sinke. -----Original Message----- From: Seigel, James [mailto:Jam...@av...]=20 Sent: Monday, June 06, 2005 16:30 To: Sinke, Mark (GE Healthcare); Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories Well I have this one implemented... > <cobertura-report destdir=3D"${coverage.html.dir}"> > <sourcepath location=3D"${src.dir}"/> > <sourcepath location=3D"${test.dir}"/> > </cobertura-report> Where you can add as many sourcepath elements as you would like. I was modelling it after how you can specify <classpath> entries for <javac>. It will also support the srcDir attribute for legacy support. I just don't know if I am happy with the names sourcepath or location...but they aren't too too bad I guess. I could post some diffs tonight if you guys are interested.... Cheers James. -----Original Message----- From: Sinke, Mark (GE Healthcare) [mailto:mar...@me...] Sent: Monday, June 06, 2005 8:27 AM To: Seigel, James; Jeremy Thomerson; J. Rentrop Cc: cob...@li... Subject: RE: [Cobertura-devel] Multiple Source directories That would be the ultimate solution; for now, I'd die for just a way to mention multiple folders... Mark.=20 |