Bug 58344

Summary: allow to run tests against Tomcat installed from vendor package
Product: Tomcat 8 Reporter: Petr Sumbera <petr.sumbera>
Component: MetaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.0.x-trunk   
Target Milestone: ----   
Hardware: PC   
OS: Solaris   
Attachments: prototype patch file.

Description Petr Sumbera 2015-09-08 07:59:23 UTC
Created attachment 33080 [details]
prototype patch file.

It would be nice to allow redirect Tomcat test suite to test Tomcat from different location than tomcat.build directory. This could be used for 'system-test'. E.g. to find out whether some other change didn't break Tomcat.

This is not just to redefine tomcat.build to some different location. Because on Unix systems Tomcat can be packaged in both location /usr and /var. Where /usr location should remain read only.

Therefore I have added test.basedir which points to location where are conf/ (for logging.properties) and webapps/ directories. Plus tomcat.testrunclasses which can be redirected to Tomcat jar files.

See attached patch file for some ideas. Where following arguments are used for Tomcat installed on Solaris:

ant -Dbase.path=/builds/psumbera/userland-tomcat8-tests/components/tomcat-8/build/i386 -Dtomcat.build=/builds/psumbera/userland-tomcat8-tests/components/tomcat-8/build/prototype/i386 -Djunit.home=/usr/share/lib/java -Dtest.reports=/builds/psumbera/userland-tomcat8-tests/components/tomcat-8/build/i386/log -Dtest.temp=/builds/psumbera/userland-tomcat8-tests/components/tomcat-8/build/i386/temp -Dtest.basedir=/var/tomcat8 -Dtomcat.testrunclasses=/usr/tomcat8/lib/*:/usr/tomcat8/bin/* test
Comment 1 Mark Thomas 2015-09-10 14:47:12 UTC
Thanks for the report and the proposed patch.

I have applied the patch to trunk and 8.0.x for 80.27 onwards.