Author: markt
Date: Thu Sep 10 14:39:47 2015
New Revision: 1702268
URL: http://svn.apache.org/r1702268
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58344
Add build properties to enable tests to be executed against alternative
binaries. Based on a patch by Petr Sumbera.
Modified:
tomcat/trunk/build.xml
tomcat/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java
Modified: tomcat/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1702268&r1=1702267&r2=1702268&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Thu Sep 10 14:39:47 2015
@@ -71,9 +71,11 @@
<property name="tomcat.release" value="${tomcat.output}/release"/>
<property name="tomcat.src.jars" value="${tomcat.output}/src-jars"/>
<property name="test.classes" value="${tomcat.output}/testclasses"/>
+ <property name="test.run.classes" value="${tomcat.output}/classes"/>
<property name="test.temp" value="${tomcat.output}/test-tmp"/>
- <property name="test.reports" value="${tomcat.build}/logs"/>
- <property name="test.apr.loc" value="${tomcat.build}/bin/native"/>
+ <property name="test.basedir" value="${tomcat.build}"/>
+ <property name="test.reports" value="${test.basedir}/logs"/>
+ <property name="test.apr.loc" value="${test.basedir}/bin/native"/>
<!-- base directory for jdbc-pool -->
<property name="tomcat.jdbc.dir" value="${basedir}/modules/jdbc-pool"/>
<!-- build output directory for jdbc-pool -->
@@ -199,11 +201,11 @@
</path>
<path id="tomcat.classpath">
- <pathelement location="${tomcat.classes}"/>
+ <pathelement path="${test.run.classes}"/>
</path>
<path id="tomcat.test.classpath">
- <pathelement location="${tomcat.build}/webapps/examples/WEB-INF/classes"/>
+ <pathelement location="${test.basedir}/webapps/examples/WEB-INF/classes"/>
<pathelement location="${test.classes}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${hamcrest.jar}"/>
@@ -1442,6 +1444,7 @@
<classpath refid="tomcat.test.run.classpath" />
<sysproperty key="tomcat.test.temp" value="${test.temp}" />
+ <sysproperty key="tomcat.test.basedir" value="${test.basedir}" />
<sysproperty key="tomcat.test.tomcatbuild" value="${tomcat.build}" />
<sysproperty key="tomcat.test.protocol" value="@{protocol}" />
<sysproperty key="tomcat.test.accesslog" value="${test.accesslog}" />
Modified:
tomcat/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java?rev=1702268&r1=1702267&r2=1702268&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
(original)
+++
tomcat/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
Thu Sep 10 14:39:47 2015
@@ -642,7 +642,7 @@ public class TestFormAuthenticator exten
this.clientShouldUseHttp11 = clientShouldUseHttp11;
Tomcat tomcat = getTomcatInstance();
- File appDir = new File(getBuildDirectory(), "webapps/examples");
+ File appDir = new File(System.getProperty("tomcat.test.basedir"),
"webapps/examples");
Context ctx = tomcat.addWebapp(null, "/examples",
appDir.getAbsolutePath());
setUseCookies(clientShouldUseCookies);
Modified: tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java?rev=1702268&r1=1702267&r2=1702268&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/LoggingBaseTest.java Thu Sep
10 14:39:47 2015
@@ -106,8 +106,9 @@ public abstract class LoggingBaseTest {
// Configure logging
System.setProperty("java.util.logging.manager",
"org.apache.juli.ClassLoaderLogManager");
- System.setProperty("java.util.logging.config.file", new File(
- getBuildDirectory(), "conf/logging.properties").toString());
+ System.setProperty("java.util.logging.config.file",
+ new File(System.getProperty("tomcat.test.basedir"),
+ "conf/logging.properties").toString());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]