Repository: ant Updated Branches: refs/heads/master f7aa06b03 -> f32cf7cfa
More hardcoded assumptions about file tree structure Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/f32cf7cf Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/f32cf7cf Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/f32cf7cf Branch: refs/heads/master Commit: f32cf7cfa542457455366a8caddb62f4d950992f Parents: f7aa06b Author: Gintas Grigelionis <[email protected]> Authored: Thu Oct 25 20:57:42 2018 +0200 Committer: Gintas Grigelionis <[email protected]> Committed: Thu Oct 25 20:57:42 2018 +0200 ---------------------------------------------------------------------- build.xml | 5 +-- src/etc/poms/ant/pom.xml | 6 ++-- src/etc/testcases/taskdefs/signjar.xml | 34 ++++++++------------ .../ant/taskdefs/optional/junit/JUnitTask.java | 2 +- .../tools/ant/AntClassLoaderDelegationTest.java | 8 ++--- .../tools/ant/taskdefs/ExecuteJavaTest.java | 4 +-- .../tools/ant/taskdefs/ExecuteWatchdogTest.java | 4 +-- 7 files changed, 29 insertions(+), 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index 43aea59..73e662e 100644 --- a/build.xml +++ b/build.xml @@ -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" http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/src/etc/poms/ant/pom.xml ---------------------------------------------------------------------- diff --git a/src/etc/poms/ant/pom.xml b/src/etc/poms/ant/pom.xml index a501d65..3acd17c 100644 --- a/src/etc/poms/ant/pom.xml +++ b/src/etc/poms/ant/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/src/etc/testcases/taskdefs/signjar.xml ---------------------------------------------------------------------- diff --git a/src/etc/testcases/taskdefs/signjar.xml b/src/etc/testcases/taskdefs/signjar.xml index 38a1359..93a2abe 100644 --- a/src/etc/testcases/taskdefs/signjar.xml +++ b/src/etc/testcases/taskdefs/signjar.xml @@ -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> http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index 53f36b8..70c6198 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -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}"> http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java b/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java index fcaf5cb..a5d0941 100644 --- a/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java +++ b/src/tests/junit/org/apache/tools/ant/AntClassLoaderDelegationTest.java @@ -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"); http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java index 747e44d..256b0bc 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java @@ -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"); } http://git-wip-us.apache.org/repos/asf/ant/blob/f32cf7cf/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java ---------------------------------------------------------------------- diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java index 994f7af..3a4e7af 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java @@ -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"); }
