From eea994440f5e530f2e8f8cda4ba828e9da2b31b8 Mon Sep 17 00:00:00 2001 From: Gintas Grigelionis Date: Sat, 20 Oct 2018 09:04:14 +0200 Subject: [PATCH] Try to run some tests with Surefire --- src/etc/poms/ant-antlr/pom.xml | 14 ++++++++++- src/etc/poms/ant-apache-regexp/pom.xml | 5 +++- src/etc/poms/ant-commons-net/pom.xml | 11 ++++++++- src/etc/poms/ant-imageio/pom.xml | 14 ++++++++++- src/etc/poms/ant-jai/pom.xml | 23 ++++++++++++++----- src/etc/poms/ant-jdepend/pom.xml | 14 ++++++++++- src/etc/poms/ant-jsch/pom.xml | 16 ++++++++++++- src/etc/poms/ant-junit/pom.xml | 11 ++++++++- src/etc/poms/ant-junitlauncher/pom.xml | 9 ++++++++ src/etc/poms/ant/pom.xml | 2 ++ .../ant/taskdefs/optional/ssh/ScpTest.java | 4 ++++ 11 files changed, 110 insertions(+), 13 deletions(-) diff --git a/src/etc/poms/ant-antlr/pom.xml b/src/etc/poms/ant-antlr/pom.xml index dd3d72a74..783b15daf 100644 --- a/src/etc/poms/ant-antlr/pom.xml +++ b/src/etc/poms/ant-antlr/pom.xml @@ -62,11 +62,23 @@ org/apache/tools/ant/taskdefs/optional/ANTLR* + + org/apache/tools/ant/taskdefs/optional/ANTLR* + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + true ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-apache-regexp/pom.xml b/src/etc/poms/ant-apache-regexp/pom.xml index 70976ffc6..11b118847 100644 --- a/src/etc/poms/ant-apache-regexp/pom.xml +++ b/src/etc/poms/ant-apache-regexp/pom.xml @@ -57,11 +57,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma org/apache/tools/ant/util/regexp/JakartaRegexp* + + org/apache/tools/ant/util/regexp/JakartaRegexp* + ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-commons-net/pom.xml b/src/etc/poms/ant-commons-net/pom.xml index a119fb1a8..a5fc54415 100644 --- a/src/etc/poms/ant-commons-net/pom.xml +++ b/src/etc/poms/ant-commons-net/pom.xml @@ -65,9 +65,18 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + true + + ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-imageio/pom.xml b/src/etc/poms/ant-imageio/pom.xml index 24829b60d..39f90d117 100644 --- a/src/etc/poms/ant-imageio/pom.xml +++ b/src/etc/poms/ant-imageio/pom.xml @@ -54,11 +54,23 @@ org/apache/tools/ant/taskdefs/optional/image/ImageIOTask.java org/apache/tools/ant/types/optional/imageio/* + + org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + true ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-jai/pom.xml b/src/etc/poms/ant-jai/pom.xml index eae3626b0..746b4f437 100644 --- a/src/etc/poms/ant-jai/pom.xml +++ b/src/etc/poms/ant-jai/pom.xml @@ -57,11 +57,11 @@ - - jboss - JBoss - https://repository.jboss.org/nexus/content/groups/public/ - + + jboss + JBoss + https://repository.jboss.org/nexus/content/groups/public/ + @@ -73,11 +73,22 @@ org/apache/tools/ant/taskdefs/optional/image/Image.java org/apache/tools/ant/types/optional/image/* + + org/apache/tools/ant/taskdefs/optional/image/ImageTest.java + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-jdepend/pom.xml b/src/etc/poms/ant-jdepend/pom.xml index 06535be67..9b30cbcd3 100644 --- a/src/etc/poms/ant-jdepend/pom.xml +++ b/src/etc/poms/ant-jdepend/pom.xml @@ -60,11 +60,23 @@ org/apache/tools/ant/taskdefs/optional/jdepend/* + + org/apache/tools/ant/taskdefs/optional/jdepend/* + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + true ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-jsch/pom.xml b/src/etc/poms/ant-jsch/pom.xml index 289578390..fa4e15823 100644 --- a/src/etc/poms/ant-jsch/pom.xml +++ b/src/etc/poms/ant-jsch/pom.xml @@ -64,9 +64,23 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + + + scp.tmp + ${java.io.tmpdir} + + + + ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-junit/pom.xml b/src/etc/poms/ant-junit/pom.xml index 99b37620a..1448b3d20 100644 --- a/src/etc/poms/ant-junit/pom.xml +++ b/src/etc/poms/ant-junit/pom.xml @@ -92,9 +92,18 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + true + + ../../../../src/main - ../../../../src/testcases + ../../../../src/tests/junit ../../../../target/${project.artifactId}/classes ../../../../target/${project.artifactId}/testcases ../../../../target/${project.artifactId} diff --git a/src/etc/poms/ant-junitlauncher/pom.xml b/src/etc/poms/ant-junitlauncher/pom.xml index cbb3d9dac..99f84b48f 100644 --- a/src/etc/poms/ant-junitlauncher/pom.xml +++ b/src/etc/poms/ant-junitlauncher/pom.xml @@ -75,6 +75,15 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + ../../../.. + ../../../.. + true + + ../../../../src/main ../../../../src/tests/junit diff --git a/src/etc/poms/ant/pom.xml b/src/etc/poms/ant/pom.xml index b35714a9a..df4d652c5 100644 --- a/src/etc/poms/ant/pom.xml +++ b/src/etc/poms/ant/pom.xml @@ -161,6 +161,8 @@ maven-surefire-plugin ../../../.. + ../../../.. + true ant.home diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java index 5c6d9d097..b64c2114f 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/ssh/ScpTest.java @@ -39,6 +39,7 @@ import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeNotNull; /** * This is a unit test for the Scp task in Ant. It must be @@ -82,6 +83,7 @@ public class ScpTest { @Test public void testSingleFileUploadAndDownload() throws IOException { + assumeNotNull("system property scp.host must be set", sshHostUri); assertNotNull("system property scp.tmp must be set", tempDir); File uploadFile = createTemporaryFile(); @@ -107,6 +109,7 @@ public class ScpTest { @Test public void testMultiUploadAndDownload() throws IOException { + assumeNotNull("system property scp.host must be set", sshHostUri); assertNotNull("system property scp.tmp must be set", tempDir); List uploadList = new ArrayList<>(); for (int i = 0; i < 5; i++) { @@ -143,6 +146,7 @@ public class ScpTest { @Test public void testMultiResourceCollectionUpload() throws IOException { + assumeNotNull("system property scp.host must be set", sshHostUri); assertNotNull("system property scp.tmp must be set", tempDir); List uploadList = new ArrayList<>(); for (int i = 0; i < 5; i++) {