messing with poms to get test generation in there. it doesn't seem to compiled and properly though. mvn compile works but mvn install doesn't finished compiling generated tests.
This commit is contained in:
parent
f71e225cf2
commit
b05e3ccdb8
|
@ -187,6 +187,22 @@
|
|||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-testgen-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>antlr4.testgen</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<runtimeTemplates>${session.executionRootDirectory}/runtime-testsuite/resources/org/antlr/v4/test/runtime/java/Java.test.stg</runtimeTemplates>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
|
|
@ -23,17 +23,6 @@
|
|||
<artifactId>ST4</artifactId>
|
||||
<version>4.0.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
@ -44,6 +33,7 @@
|
|||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<testSourceDirectory>ignored</testSourceDirectory>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -112,6 +102,5 @@
|
|||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<testSourceDirectory>ignored</testSourceDirectory>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -64,10 +64,6 @@ public class TestGenerator {
|
|||
*
|
||||
* Example:
|
||||
*
|
||||
* $ java org.antlr.v4.testgen.TestGenerator -o /tmp -templates /Users/parrt/antlr/code/antlr4/tool/test/org/antlr/v4/test/runtime/java/Java.test.stg
|
||||
*
|
||||
* Most commonly:
|
||||
*
|
||||
* $ java org.antlr.v4.testgen.TestGenerator -root /Users/parrt/antlr/code/antlr4
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
@ -280,8 +276,7 @@ public class TestGenerator {
|
|||
public String getTestTemplatesResourceDir() { return "org/antlr/v4/test/runtime/templates"; }
|
||||
|
||||
public String getTargetNameFromTemplatesFileName() {
|
||||
// runtimeTemplates is like /Users/parrt/antlr/code/antlr4/tool/test/org/antlr/v4/test/runtime/java/Java.test.stg
|
||||
// extra target name
|
||||
// runtimeTemplates is like ~/antlr/code/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/java/Java.test.stg
|
||||
int targetEnd = runtimeTemplates.getName().indexOf(".test.stg");
|
||||
return runtimeTemplates.getName().substring(0, targetEnd);
|
||||
}
|
||||
|
|
16
tool/pom.xml
16
tool/pom.xml
|
@ -85,22 +85,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-testgen-maven-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>antlr4.testgen</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<runtimeTemplates>test/org/antlr/v4/test/runtime/java/Java.test.stg</runtimeTemplates>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue