[dev] Using JUnit 4 in OOo build environment
One of my Test Cleanup (http://wiki.services.openoffice.org/wiki/Test_Cleanup) efforts is to consistently use standard JUnit 4 for the Java-based tests in the OOo code base. It appears that JUnit is not yet a requirement in the OOo build environment, and I see different ways how to make it one: 1 Include JUnit 4 as an external module in the OOo code base, allowing some configure --with-system-junit switch to override it. We could include either 1.1 http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-4.8.1.jar/download which, due to being platform-independent, can directly be used without any compilation (and appears to run fine on our Java 5 baseline), or 1.2 http://sourceforge.net/projects/junit/files/junit/4.8.1/junit4.8.1.zip/download and build it. 2 Require JUnit 4 to be installed as a prerequisite, checked by configure. We could either 2.1 try to find it on CLASSPATH (which would imply that set_soenv.in must no longer resets the CLASSPATH; which is probably dubious, anyway---as dubious as the additional XCLASSPATH), or 2.2 require that an appropriate configure --with-junit=... switch is always passed (which would be optionally available in 2.1, too, to explicitly specify the JUnit 4 to be used). Opinions? -Stephan - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
Re: [dev] Using JUnit 4 in OOo build environment
Hi, On Wed, Feb 10, 2010 at 02:57:24PM +0100, Stephan Bergmann wrote: 1 Include JUnit 4 as an external module in the OOo code base, allowing some configure --with-system-junit switch to override it. We could include either Good. 1.1 http://sourceforge.net/projects/junit/files/junit/4.8.1/junit-4.8.1.jar/download which, due to being platform-independent, can directly be used without any compilation (and appears to run fine on our Java 5 baseline), or No way. No binary only stuff from somewhere in the tree. Should you do that, be sure I'll immediately file a P1. 1.2 http://sourceforge.net/projects/junit/files/junit/4.8.1/junit4.8.1.zip/download and build it. That's the way to go if you want to include it in the build. 2 Require JUnit 4 to be installed as a prerequisite, checked by configure. We could either 2.1 try to find it on CLASSPATH (which would imply that set_soenv.in must no longer resets the CLASSPATH; which is probably dubious, anyway---as dubious as the additional XCLASSPATH), or Which probably will break a lost of system* stuff, so I'd be wary.. Of course you shoudl try your best (like with the SRB libs, the tomcat libs or the apache-commons libs) to find out where a junit4 is. [ /usr/share/java/junit4.jar is a safe bet. ] 2.2 require that an appropriate configure --with-junit=... switch is always passed (which would be optionally available in 2.1, too, to explicitly specify the JUnit 4 to be used). Only when the automatic detection (see above) fails. Grüße/Regards, René - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
Re: [dev] Using JUnit 4 in OOo build environment
On 02/10/10 15:12, Rene Engelhard wrote: 2.1 try to find it on CLASSPATH (which would imply that set_soenv.in must no longer resets the CLASSPATH; which is probably dubious, anyway---as dubious as the additional XCLASSPATH), or Which probably will break a lost of system* stuff, so I'd be wary.. Of course you shoudl try your best (like with the SRB libs, the tomcat libs or the apache-commons libs) to find out where a junit4 is. [ /usr/share/java/junit4.jar is a safe bet. ] Ah, hadn't been aware of this. Yes, sounds best to do it in the same way as it is already done for those other jars. Thanks, -Stephan - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org