tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Need guidance for writing unit tests for 55317
Date Tue, 20 Aug 2013 17:25:50 GMT
Nick,

On 8/20/13 11:15 AM, Nick Williams wrote:
> 
> On Aug 20, 2013, at 10:12 AM, Christopher Schultz wrote:
> 
>> Mark,
>>
>> On 8/20/13 9:25 AM, Mark Thomas wrote:
>>> On 20/08/2013 14:13, Nick Williams wrote:
>>>> I'm working on implementing bugzilla 55317. It's a pretty important
>>>> change (weaving) to a pretty import class (WebappClassLoader), so it
>>>> obviously needs some unit tests. However, I need some guidance:
>>>>
>>>> 1) I've never gotten all the existing tests to pass on my machine.
>>>> Last time I ran them it took 45 minutes (holy crap) and about 1/3 of
>>>> them failed. This is obviously something wrong with my configuration
>>>> and not with Tomcat. I'd like to avoid running all tests for this
>>>> reason and only run the particular tests I'm working on. How would I
>>>> do this? Is this even possible with Ant?
>>>
>>> ant test -Dtest.entry=org.apache.catalina.TestClassToExecute
>>>
>>> svn co ...
>>> ant clean test
>>>
>>> should work on Windows, Linux and OSX for all three connectors.
>>
>> 1/3 of the tests will fail if the native connector hasn't been built.
>> Could that be your problem, Nick?
> 
> If the native connector doesn't get built by running "ant clean
> test", then yes, that could very well be my problem.

It does not.

tcnative can be built on Max OS X like this:

$ cd $CATALINA_HOME/bin
$ tar xzf tomcat-native.tar.gz
$ cd tomcat-native-*-src/jni/native
$ ./configure --with-apr=/usr/bin/apr-1-config --with-ssl
--with-java-home=`/usr/libexec/java_home`

At this point, configure chokes on my system because it's trying to find
'cc' under Xcode.app and I'm not sure where it's sniffing that directory
base from. Maybe you'll have better luck. I'll reply if I figure it out.

After ./configure, you ought to be able to just "make" and wait a minute
or two. Remember that you get a few libraries and a few links. It's best
to copy the links as links into $TOMCAT_HOME/bin or wherever you want to
put them. Then, remember to set java.library.path when launching
anything Java-related.

-chris


Mime
View raw message