diff options
author | Andy Clement <aclement@pivotal.io> | 2019-02-01 14:07:14 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-02-01 14:07:14 -0800 |
commit | fe22dfbf7029248eb8a55f94572e92ea14419b6b (patch) | |
tree | c230736dd2476bd72b62802dabdc1e4d7be593a1 | |
parent | ca79c1d20c9a45376286aa781194f9ac5047ae7c (diff) | |
download | aspectj-fe22dfbf7029248eb8a55f94572e92ea14419b6b.tar.gz aspectj-fe22dfbf7029248eb8a55f94572e92ea14419b6b.zip |
Able to build run-all-junit-tests with maven
-rw-r--r-- | pom.xml | 52 | ||||
-rw-r--r-- | run-all-junit-tests/pom.xml | 93 | ||||
-rw-r--r-- | run-all-junit-tests/src/test/java/AllModuleTests.java | 26 | ||||
-rw-r--r-- | run-all-junit-tests/src/test/java/AllTests.java | 81 | ||||
-rw-r--r-- | run-all-junit-tests/src/test/java/RunTheseBeforeYouCommitTests.java | 56 |
5 files changed, 185 insertions, 123 deletions
@@ -4,20 +4,39 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.aspectj</groupId> - <artifactId>aspectj-parent</artifactId> - <packaging>pom</packaging> - <version>${revision}</version> - <name>AspectJ Parent Project</name> - <properties> <revision>1.9.3.BUILD-SNAPSHOT</revision> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> + <groupId>org.aspectj</groupId> + <artifactId>aspectj-parent</artifactId> + <packaging>pom</packaging> + <version>1.9.3.BUILD-SNAPSHOT</version> + <name>AspectJ Parent Project</name> + <modules> <module>util</module> - <module>bcel</module> + <module>bridge</module> + <module>testing-util</module> + <module>org.aspectj.matcher</module> + <module>asm</module> + <module>testing-client</module> + <module>runtime</module> + <module>bcel-builder</module> + <module>weaver</module> + <module>loadtime</module> + <module>org.eclipse.jdt.core</module> + <module>org.aspectj.ajdt.core</module> + <module>ajde.core</module> + <module>ajde</module> + <module>ajdoc</module> + <module>taskdefs</module> + <module>testing</module> + <module>testing-drivers</module> + <module>tests</module> + <module>build</module> + <module>run-all-junit-tests</module> </modules> <build> @@ -36,11 +55,28 @@ <artifactId>maven-surefire-plugin</artifactId> <configuration> <testFailureIgnore>true</testFailureIgnore> +<excludes> +<exclude>**/*ModuleTests.java</exclude> +</excludes> </configuration> </plugin> </plugins> </pluginManagement> - </build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> <dependencies> <dependency> diff --git a/run-all-junit-tests/pom.xml b/run-all-junit-tests/pom.xml index 1b7d974d3..0652458db 100644 --- a/run-all-junit-tests/pom.xml +++ b/run-all-junit-tests/pom.xml @@ -15,13 +15,106 @@ <name>run-all-junit-tests</name> <dependencies> + + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>util</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>util</artifactId> <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>ajde</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>ajde.core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>asm</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>bridge</artifactId> + <version>${project.version}</version> + <type>test-jar</type> </dependency> <dependency> <groupId>org.aspectj</groupId> + <artifactId>loadtime</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>runtime</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>ajdoc</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>weaver</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>taskdefs</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>testing-client</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>testing-drivers</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>testing-util</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>org.aspectj.matcher</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>build</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + + + <dependency> + <groupId>org.aspectj</groupId> <artifactId>bridge</artifactId> <version>${project.version}</version> </dependency> diff --git a/run-all-junit-tests/src/test/java/AllModuleTests.java b/run-all-junit-tests/src/test/java/AllModuleTests.java deleted file mode 100644 index b373f456a..000000000 --- a/run-all-junit-tests/src/test/java/AllModuleTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/* ******************************************************************* - * Copyright (c) 2005 Contributors. - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://eclipse.org/legal/epl-v10.html - * - * Contributors: - * Wes Isberg initial implementation - * ******************************************************************/ - -import junit.framework.Test; -import junit.framework.TestCase; - -/** - * Alias to maintain convention for invoking JUnit from Ant - * by discovery of module root tests that name is *ModuleTests. - */ -public class AllModuleTests extends TestCase { - public static Test suite() { - // does not include compiler tests, i.e., tests/../TestsModuleTests - return AllTests.suite(); - } - -} diff --git a/run-all-junit-tests/src/test/java/AllTests.java b/run-all-junit-tests/src/test/java/AllTests.java deleted file mode 100644 index 94d0a1822..000000000 --- a/run-all-junit-tests/src/test/java/AllTests.java +++ /dev/null @@ -1,81 +0,0 @@ -/* ******************************************************************* - * Copyright (c) 2003 Contributors. - * All rights reserved. - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Wes Isberg initial implementation - * ******************************************************************/ - -// default package -import junit.framework.TestCase; -import junit.framework.TestSuite; - -import org.aspectj.ajde.AjdeModuleTests; -import org.aspectj.ajde.core.AjdeCoreModuleTests; -import org.aspectj.ajdt.EajcModuleTests; -import org.aspectj.asm.AsmModuleTests; -import org.aspectj.bridge.BridgeModuleTests; -import org.aspectj.build.BuildModuleTests; -import org.aspectj.loadtime.Loadtime5ModuleTests; -import org.aspectj.loadtime.LoadtimeModuleTests; -import org.aspectj.runtime.Aspectj5rtModuleTests; -import org.aspectj.runtime.RuntimeModuleTests; -import org.aspectj.testing.TestingClientModuleTests; -import org.aspectj.testing.TestingDriversModuleTests; -import org.aspectj.testing.TestingModuleTests; -import org.aspectj.testing.util.TestUtil; -import org.aspectj.testingutil.TestingUtilModuleTests; -import org.aspectj.tools.ajbrowser.AjbrowserModuleTests; -import org.aspectj.tools.ajdoc.AjdocModuleTests; -import org.aspectj.tools.ant.TaskdefsModuleTests; -import org.aspectj.util.LangUtil; -import org.aspectj.util.UtilModuleTests; -import org.aspectj.weaver.BcweaverModuleTests; -import org.aspectj.weaver.MatcherModuleTests; -import org.aspectj.weaver.Weaver5ModuleTests; - -public class AllTests extends TestCase { - public static final boolean skipSupportModules = false; - - public static TestSuite suite() { - TestSuite suite = new TestSuite(AllTests.class.getName()); - suite.addTest(AjbrowserModuleTests.suite()); - suite.addTest(AjdeModuleTests.suite()); - suite.addTest(AjdeCoreModuleTests.suite()); - suite.addTest(AjdocModuleTests.suite()); - suite.addTest(AsmModuleTests.suite()); - suite.addTest(BridgeModuleTests.suite()); - suite.addTest(LoadtimeModuleTests.suite()); - suite.addTest(EajcModuleTests.suite()); - // suite.addTest(LibModuleTests.suite()); - suite.addTest(RuntimeModuleTests.suite()); - suite.addTest(TaskdefsModuleTests.suite()); - if (!skipSupportModules) { - suite.addTest(BuildModuleTests.suite()); - suite.addTest(TestingModuleTests.suite()); - suite.addTest(TestingClientModuleTests.suite()); - suite.addTest(TestingDriversModuleTests.suite()); - suite.addTest(TestingUtilModuleTests.suite()); - } - suite.addTest(UtilModuleTests.suite()); - suite.addTest(MatcherModuleTests.suite()); - suite.addTest(BcweaverModuleTests.suite()); - if (LangUtil.is15VMOrGreater()) { - suite.addTest(Aspectj5rtModuleTests.suite()); - suite.addTest(Loadtime5ModuleTests.suite()); - suite.addTest(Weaver5ModuleTests.suite()); - } else { - suite.addTest(TestUtil.skipTest("for 1.5")); - } - return suite; - } - - public AllTests(String name) { - super(name); - } - -} diff --git a/run-all-junit-tests/src/test/java/RunTheseBeforeYouCommitTests.java b/run-all-junit-tests/src/test/java/RunTheseBeforeYouCommitTests.java index 767bcb3ea..4515959c9 100644 --- a/run-all-junit-tests/src/test/java/RunTheseBeforeYouCommitTests.java +++ b/run-all-junit-tests/src/test/java/RunTheseBeforeYouCommitTests.java @@ -1,29 +1,69 @@ /* ******************************************************************* - * Copyright (c) 2005 Contributors. + * Copyright (c) 2005-2019 Contributors. * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http://eclipse.org/legal/epl-v10.html * - * Contributors (See CVS checkin's): - * * ******************************************************************/ - +import org.aspectj.ajde.AjdeModuleTests; +import org.aspectj.ajde.core.AjdeCoreModuleTests; +import org.aspectj.ajdt.AjdtCoreModuleTests; +import org.aspectj.asm.AsmModuleTests; +import org.aspectj.bridge.BridgeModuleTests; +import org.aspectj.build.BuildModuleTests; +import org.aspectj.loadtime.LoadtimeModuleTests; +import org.aspectj.matcher.MatcherModuleTests; +import org.aspectj.runtime.RuntimeModuleTests; +import org.aspectj.testing.TestingClientModuleTests; +import org.aspectj.testing.TestingModuleTests; +import org.aspectj.testing.drivers.TestingDriversModuleTests; +import org.aspectj.testingutil.TestingUtilModuleTests; import org.aspectj.tests.TestsModuleTests; +import org.aspectj.tools.ajdoc.AjdocModuleTests; +import org.aspectj.tools.ant.taskdefs.TaskdefsModuleTests; +import org.aspectj.util.UtilModuleTests; +import org.aspectj.weaver.WeaverModuleTests; import junit.framework.Test; import junit.framework.TestSuite; +/** + * @author Andy Clement + */ public class RunTheseBeforeYouCommitTests { public static Test suite() { String name = RunTheseBeforeYouCommitTests.class.getName(); TestSuite suite = new TestSuite(name); - // unit tests - suite.addTest(AllTests.suite()); - // compiler tests - suite.addTest(TestsModuleTests.suite()); + + // Main modules + suite.addTest(UtilModuleTests.suite()); + suite.addTest(AjdeCoreModuleTests.suite()); + suite.addTest(AjdeModuleTests.suite()); + suite.addTest(AsmModuleTests.suite()); + suite.addTest(BridgeModuleTests.suite()); + suite.addTest(LoadtimeModuleTests.suite()); + suite.addTest(RuntimeModuleTests.suite()); + suite.addTest(AjdocModuleTests.suite()); + suite.addTest(WeaverModuleTests.suite()); + suite.addTest(TaskdefsModuleTests.suite()); + suite.addTest(MatcherModuleTests.suite()); +// suite.addTest(AjbrowserModuleTests.suite()); // There are none so far... +// suite.addTest(LibModuleTests.suite()); // anyone using this? + suite.addTest(AjdtCoreModuleTests.suite()); + + // Support modules + suite.addTest(TestingModuleTests.suite()); + suite.addTest(TestingClientModuleTests.suite()); + suite.addTest(TestingDriversModuleTests.suite()); + suite.addTest(TestingUtilModuleTests.suite()); + suite.addTest(BuildModuleTests.suite()); + + // Compiler tests + suite.addTest(TestsModuleTests.suite()); + return suite; } } |