@@ -84,13 +84,14 @@ | |||||
<property name="build.junit.xml" location="${build.tests}/xml"/> | <property name="build.junit.xml" location="${build.tests}/xml"/> | ||||
<property name="build.junit.tmpdir" location="${build.tests}/tmp"/> | <property name="build.junit.tmpdir" location="${build.tests}/tmp"/> | ||||
<property name="build.junit.reports" location="${build.tests}/reports"/> | <property name="build.junit.reports" location="${build.tests}/reports"/> | ||||
<property name="build.pkg.dir" value="${build.dir}/pkg"/> | |||||
<property name="antunit.xml" location="${build.dir}/antunit/xml"/> | <property name="antunit.xml" location="${build.dir}/antunit/xml"/> | ||||
<property name="antunit.tmpdir" location="${build.dir}/antunit/tmp"/> | <property name="antunit.tmpdir" location="${build.dir}/antunit/tmp"/> | ||||
<property name="antunit.reports" location="${build.dir}/antunit/reports"/> | <property name="antunit.reports" location="${build.dir}/antunit/reports"/> | ||||
<property name="antunit.loglevel" value="none"/> | <property name="antunit.loglevel" value="none"/> | ||||
<!-- the absolute path --> | <!-- the absolute path --> | ||||
<property name="build.classes.value" location="${build.classes}"/> | |||||
<property name="build.tests.value" location="${build.tests}"/> | <property name="build.tests.value" location="${build.tests}"/> | ||||
<property name="build.pkg.dir" value="${build.dir}/pkg"/> | |||||
<!-- | <!-- | ||||
=================================================================== | =================================================================== | ||||
@@ -1704,7 +1705,7 @@ ${antunit.reports} | |||||
errorproperty="junit.failed" | errorproperty="junit.failed" | ||||
filtertrace="${junit.filtertrace}"> | filtertrace="${junit.filtertrace}"> | ||||
<sysproperty key="ant.home" value="${ant.home}"/> | <sysproperty key="ant.home" value="${ant.home}"/> | ||||
<sysproperty key="build.tests" file="${build.tests}"/> | |||||
<sysproperty key="build.classes.value" value="${build.classes.value}"/> | |||||
<sysproperty key="build.tests.value" value="${build.tests.value}"/> | <sysproperty key="build.tests.value" value="${build.tests.value}"/> | ||||
<sysproperty key="offline" value="${offline}"/> | <sysproperty key="offline" value="${offline}"/> | ||||
<sysproperty key="tests-classpath.value" | <sysproperty key="tests-classpath.value" | ||||
@@ -228,12 +228,12 @@ | |||||
<value>${env.ANT_HOME}</value> | <value>${env.ANT_HOME}</value> | ||||
</property> | </property> | ||||
<property> | <property> | ||||
<name>build.tests</name> | |||||
<value>target/${project.artifactId}/testcases</value> | |||||
<name>build.classes.value</name> | |||||
<value>${project.basedir}/../../../../target/${project.artifactId}/classes</value> | |||||
</property> | </property> | ||||
<property> | <property> | ||||
<name>build.tests.value</name> | <name>build.tests.value</name> | ||||
<value>${project.basedir}/target/${project.artifactId}/testcases</value> | |||||
<value>${project.basedir}/../../../../target/${project.artifactId}/testcases</value> | |||||
</property> | </property> | ||||
<property> | <property> | ||||
<name>offline</name> | <name>offline</name> | ||||
@@ -20,42 +20,38 @@ | |||||
<import file="../buildfiletest-base.xml"/> | <import file="../buildfiletest-base.xml"/> | ||||
<target name="setUp"> | <target name="setUp"> | ||||
<mkdir dir="${output}" /> | |||||
<property name="subdir" location="${output}/subdir" /> | |||||
<property name="classes.dir" value="../../../build/classes"/> | |||||
<property name="test.jar" location="${output}/signtest.jar" /> | |||||
<property name="subdirtest.jar" location="${subdir}/signtest.jar" /> | |||||
<mkdir dir="${output}"/> | |||||
<property name="subdir" location="${output}/subdir"/> | |||||
<property name="test.jar" location="${output}/signtest.jar"/> | |||||
<property name="subdirtest.jar" location="${subdir}/signtest.jar"/> | |||||
</target> | </target> | ||||
<macrodef name="assertSigned"> | <macrodef name="assertSigned"> | ||||
<attribute name="jar" default="${test.jar}" /> | |||||
<attribute name="jar" default="${test.jar}"/> | |||||
<sequential> | <sequential> | ||||
<fail message="not signed: @{jar}" > | |||||
<fail message="not signed: @{jar}"> | |||||
<condition> | <condition> | ||||
<not><issigned file="@{jar}" /></not> | |||||
<not><issigned file="@{jar}"/></not> | |||||
</condition> | </condition> | ||||
</fail> | </fail> | ||||
</sequential> | </sequential> | ||||
</macrodef> | </macrodef> | ||||
<presetdef name="sign-base"> | <presetdef name="sign-base"> | ||||
<signjar alias="testonly" keystore="testkeystore" | |||||
storepass="apacheant"/> | |||||
<signjar alias="testonly" keystore="testkeystore" storepass="apacheant"/> | |||||
</presetdef> | </presetdef> | ||||
<presetdef name="verify-base"> | <presetdef name="verify-base"> | ||||
<verifyjar keystore="testkeystore" | |||||
storepass="apacheant"/> | |||||
<verifyjar keystore="testkeystore" storepass="apacheant"/> | |||||
</presetdef> | </presetdef> | ||||
<presetdef name="sign"> | <presetdef name="sign"> | ||||
<sign-base jar="${test.jar}" /> | |||||
<sign-base jar="${test.jar}"/> | |||||
</presetdef> | </presetdef> | ||||
<target name="jar" depends="setUp"> | <target name="jar" depends="setUp"> | ||||
<jar jarfile="${test.jar}" basedir="${classes.dir}" includes="**/Task.class"/> | |||||
<jar jarfile="${test.jar}" basedir="${build.classes.value}" includes="**/Task.class"/> | |||||
</target> | </target> | ||||
<target name="help"> | <target name="help"> | ||||
@@ -63,7 +59,7 @@ | |||||
</target> | </target> | ||||
<target name="basic" depends="jar"> | <target name="basic" depends="jar"> | ||||
<sign /> | |||||
<sign/> | |||||
<assertSigned/> | <assertSigned/> | ||||
</target> | </target> | ||||
@@ -84,14 +80,12 @@ | |||||
</target> | </target> | ||||
<target name="urlKeystoreHTTP" depends="jar"> | <target name="urlKeystoreHTTP" depends="jar"> | ||||
<sign | |||||
keystore="http://ant.apache.org/webtest/testkeystore" | |||||
/> | |||||
<sign keystore="http://ant.apache.org/webtest/testkeystore"/> | |||||
<assertSigned/> | <assertSigned/> | ||||
</target> | </target> | ||||
<target name="testTsaLocalhost" depends="jar"> | <target name="testTsaLocalhost" depends="jar"> | ||||
<sign tsaurl="http://localhost:0/" /> | |||||
<sign tsaurl="http://localhost:0/"/> | |||||
</target> | </target> | ||||
</project> | </project> |
@@ -102,7 +102,7 @@ import org.apache.tools.ant.util.StringUtils; | |||||
* <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}"> | * <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}"> | ||||
* <jvmarg value="-classic"/> | * <jvmarg value="-classic"/> | ||||
* <classpath refid="tests-classpath"/> | * <classpath refid="tests-classpath"/> | ||||
* <sysproperty key="build.tests" value="${build.tests}"/> | |||||
* <sysproperty key="build.tests.value" value="${build.tests.value}"/> | |||||
* <formatter type="brief" usefile="false" /> | * <formatter type="brief" usefile="false" /> | ||||
* <batchtest> | * <batchtest> | ||||
* <fileset dir="${tests.dir}"> | * <fileset dir="${tests.dir}"> | ||||
@@ -58,8 +58,8 @@ public class AntClassLoaderDelegationTest { | |||||
@Test | @Test | ||||
public void testFindResources() throws Exception { | public void testFindResources() throws Exception { | ||||
// This path should contain the class files for these testcases: | // This path should contain the class files for these testcases: | ||||
String buildTestcases = System.getProperty("build.tests"); | |||||
assertNotNull("defined ${build.tests}", buildTestcases); | |||||
String buildTestcases = System.getProperty("build.tests.value"); | |||||
assertNotNull("defined ${build.tests.value}", buildTestcases); | |||||
assertTrue("have a dir " + buildTestcases, | assertTrue("have a dir " + buildTestcases, | ||||
new File(buildTestcases).isDirectory()); | new File(buildTestcases).isDirectory()); | ||||
Path path = new Path(p, buildTestcases + "/org"); | Path path = new Path(p, buildTestcases + "/org"); | ||||
@@ -84,8 +84,8 @@ public class AntClassLoaderDelegationTest { | |||||
@SuppressWarnings("resource") | @SuppressWarnings("resource") | ||||
@Test | @Test | ||||
public void testFindIsolateResources() throws Exception { | public void testFindIsolateResources() throws Exception { | ||||
String buildTestcases = System.getProperty("build.tests"); | |||||
assertNotNull("defined ${build.tests}", buildTestcases); | |||||
String buildTestcases = System.getProperty("build.tests.value"); | |||||
assertNotNull("defined ${build.tests.value}", buildTestcases); | |||||
assertTrue("have a dir " + buildTestcases, | assertTrue("have a dir " + buildTestcases, | ||||
new File(buildTestcases).isDirectory()); | new File(buildTestcases).isDirectory()); | ||||
Path path = new Path(p, buildTestcases + "/org"); | Path path = new Path(p, buildTestcases + "/org"); | ||||
@@ -119,9 +119,9 @@ public class ExecuteJavaTest { | |||||
* This is severely dependent on the build.xml properties. | * This is severely dependent on the build.xml properties. | ||||
*/ | */ | ||||
private static String getTestClassPath() { | private static String getTestClassPath() { | ||||
String classpath = System.getProperty("build.tests"); | |||||
String classpath = System.getProperty("build.tests.value"); | |||||
if (classpath == null) { | if (classpath == null) { | ||||
System.err.println("WARNING: 'build.tests' property is not available!"); | |||||
System.err.println("WARNING: 'build.tests.value' property is not available!"); | |||||
classpath = System.getProperty("java.class.path"); | classpath = System.getProperty("java.class.path"); | ||||
} | } | ||||
@@ -56,9 +56,9 @@ public class ExecuteWatchdogTest { | |||||
* severely tied to the build.xml properties. | * severely tied to the build.xml properties. | ||||
*/ | */ | ||||
private static String getTestClassPath() { | private static String getTestClassPath() { | ||||
String classpath = System.getProperty("build.tests"); | |||||
String classpath = System.getProperty("build.tests.value"); | |||||
if (classpath == null) { | if (classpath == null) { | ||||
System.err.println("WARNING: 'build.tests' property is not available!"); | |||||
System.err.println("WARNING: 'build.tests.value' property is not available!"); | |||||
classpath = System.getProperty("java.class.path"); | classpath = System.getProperty("java.class.path"); | ||||
} | } | ||||