| @@ -84,13 +84,14 @@ | |||
| <property name="build.junit.xml" location="${build.tests}/xml"/> | |||
| <property name="build.junit.tmpdir" location="${build.tests}/tmp"/> | |||
| <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.tmpdir" location="${build.dir}/antunit/tmp"/> | |||
| <property name="antunit.reports" location="${build.dir}/antunit/reports"/> | |||
| <property name="antunit.loglevel" value="none"/> | |||
| <!-- the absolute path --> | |||
| <property name="build.classes.value" location="${build.classes}"/> | |||
| <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" | |||
| filtertrace="${junit.filtertrace}"> | |||
| <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="offline" value="${offline}"/> | |||
| <sysproperty key="tests-classpath.value" | |||
| @@ -228,12 +228,12 @@ | |||
| <value>${env.ANT_HOME}</value> | |||
| </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> | |||
| <name>build.tests.value</name> | |||
| <value>${project.basedir}/target/${project.artifactId}/testcases</value> | |||
| <value>${project.basedir}/../../../../target/${project.artifactId}/testcases</value> | |||
| </property> | |||
| <property> | |||
| <name>offline</name> | |||
| @@ -20,42 +20,38 @@ | |||
| <import file="../buildfiletest-base.xml"/> | |||
| <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> | |||
| <macrodef name="assertSigned"> | |||
| <attribute name="jar" default="${test.jar}" /> | |||
| <attribute name="jar" default="${test.jar}"/> | |||
| <sequential> | |||
| <fail message="not signed: @{jar}" > | |||
| <fail message="not signed: @{jar}"> | |||
| <condition> | |||
| <not><issigned file="@{jar}" /></not> | |||
| <not><issigned file="@{jar}"/></not> | |||
| </condition> | |||
| </fail> | |||
| </sequential> | |||
| </macrodef> | |||
| <presetdef name="sign-base"> | |||
| <signjar alias="testonly" keystore="testkeystore" | |||
| storepass="apacheant"/> | |||
| <signjar alias="testonly" keystore="testkeystore" storepass="apacheant"/> | |||
| </presetdef> | |||
| <presetdef name="verify-base"> | |||
| <verifyjar keystore="testkeystore" | |||
| storepass="apacheant"/> | |||
| <verifyjar keystore="testkeystore" storepass="apacheant"/> | |||
| </presetdef> | |||
| <presetdef name="sign"> | |||
| <sign-base jar="${test.jar}" /> | |||
| <sign-base jar="${test.jar}"/> | |||
| </presetdef> | |||
| <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 name="help"> | |||
| @@ -63,7 +59,7 @@ | |||
| </target> | |||
| <target name="basic" depends="jar"> | |||
| <sign /> | |||
| <sign/> | |||
| <assertSigned/> | |||
| </target> | |||
| @@ -84,14 +80,12 @@ | |||
| </target> | |||
| <target name="urlKeystoreHTTP" depends="jar"> | |||
| <sign | |||
| keystore="http://ant.apache.org/webtest/testkeystore" | |||
| /> | |||
| <sign keystore="http://ant.apache.org/webtest/testkeystore"/> | |||
| <assertSigned/> | |||
| </target> | |||
| <target name="testTsaLocalhost" depends="jar"> | |||
| <sign tsaurl="http://localhost:0/" /> | |||
| <sign tsaurl="http://localhost:0/"/> | |||
| </target> | |||
| </project> | |||
| @@ -102,7 +102,7 @@ import org.apache.tools.ant.util.StringUtils; | |||
| * <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}"> | |||
| * <jvmarg value="-classic"/> | |||
| * <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" /> | |||
| * <batchtest> | |||
| * <fileset dir="${tests.dir}"> | |||
| @@ -58,8 +58,8 @@ public class AntClassLoaderDelegationTest { | |||
| @Test | |||
| public void testFindResources() throws Exception { | |||
| // 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, | |||
| new File(buildTestcases).isDirectory()); | |||
| Path path = new Path(p, buildTestcases + "/org"); | |||
| @@ -84,8 +84,8 @@ public class AntClassLoaderDelegationTest { | |||
| @SuppressWarnings("resource") | |||
| @Test | |||
| 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, | |||
| new File(buildTestcases).isDirectory()); | |||
| Path path = new Path(p, buildTestcases + "/org"); | |||
| @@ -119,9 +119,9 @@ public class ExecuteJavaTest { | |||
| * This is severely dependent on the build.xml properties. | |||
| */ | |||
| private static String getTestClassPath() { | |||
| String classpath = System.getProperty("build.tests"); | |||
| String classpath = System.getProperty("build.tests.value"); | |||
| 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"); | |||
| } | |||
| @@ -56,9 +56,9 @@ public class ExecuteWatchdogTest { | |||
| * severely tied to the build.xml properties. | |||
| */ | |||
| private static String getTestClassPath() { | |||
| String classpath = System.getProperty("build.tests"); | |||
| String classpath = System.getProperty("build.tests.value"); | |||
| 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"); | |||
| } | |||