Merge pull request #937 from jvanzyl/master
Integrating tests for all supported targets
This commit is contained in:
commit
a0fbded125
13
pom.xml
13
pom.xml
|
@ -64,7 +64,6 @@
|
|||
<module>tool</module>
|
||||
<module>antlr4-maven-plugin</module>
|
||||
<module>antlr4-testgen-maven-plugin</module>
|
||||
<module>runtime-testsuite</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
@ -117,5 +116,15 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>rts</id>
|
||||
<modules>
|
||||
<module>runtime-testsuite</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Script we're using to get some of the test classes required for the other targets
|
||||
|
||||
pwd=`pwd`
|
||||
dir="$pwd/test/org/antlr/v4/test/runtime"
|
||||
|
||||
# python2
|
||||
wget https://raw.githubusercontent.com/antlr/antlr4-python2/master/tool/test/org/antlr/v4/test/runtime/python2/BasePython2Test.java -O $dir/python2/BasePython2Test.java
|
||||
|
||||
# python3
|
||||
wget https://raw.githubusercontent.com/antlr/antlr4-python3/master/tool/test/org/antlr/v4/test/runtime/python3/BasePython3Test.java -O $dir/python3/BasePython3Test.java
|
||||
|
||||
mkdir -p $dir/python
|
||||
|
||||
wget https://raw.githubusercontent.com/antlr/antlr4-python3/master/tool/test/org/antlr/v4/test/runtime/python/BasePythonTest.java -O $dir/python/BasePythonTest.java
|
||||
|
||||
# javascript
|
||||
wget https://raw.githubusercontent.com/antlr/antlr4-javascript/master/tool/test/org/antlr/v4/test/runtime/javascript/node/BaseTest.java -O $dir/javascript/node/BaseTest.java
|
||||
|
||||
# csharp
|
||||
wget https://raw.githubusercontent.com/antlr/antlr4-csharp/master/tool/test/org/antlr/v4/test/runtime/csharp/BaseTest.java -O $dir/csharp/BaseTest.java
|
|
@ -28,6 +28,12 @@
|
|||
<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>
|
||||
|
@ -38,5 +44,103 @@
|
|||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.googlecode.maven-download-plugin</groupId>
|
||||
<artifactId>download-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<configuration>
|
||||
<skipCache>true</skipCache>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>python2</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>https://raw.githubusercontent.com/antlr/antlr4-python2/master/tool/test/org/antlr/v4/test/runtime/python2/BasePython2Test.java</url>
|
||||
<outputFileName>generated-sources/org/antlr/v4/test/runtime/python2/BasePython2Test.java</outputFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>python3</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>https://raw.githubusercontent.com/antlr/antlr4-python3/master/tool/test/org/antlr/v4/test/runtime/python3/BasePython3Test.java</url>
|
||||
<outputFileName>generated-sources/org/antlr/v4/test/runtime/python3/BasePython3Test.java</outputFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>python</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>https://raw.githubusercontent.com/antlr/antlr4-python3/master/tool/test/org/antlr/v4/test/runtime/python/BasePythonTest.java</url>
|
||||
<outputFileName>generated-sources/org/antlr/v4/test/runtime/python/BasePythonTest.java</outputFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>javascript</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>https://raw.githubusercontent.com/antlr/antlr4-javascript/master/tool/test/org/antlr/v4/test/runtime/javascript/node/BaseTest.java</url>
|
||||
<outputFileName>generated-sources/org/antlr/v4/test/runtime/javascript/node/BaseTest.java</outputFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>csharp</id>
|
||||
<phase>generate-test-resources</phase>
|
||||
<goals>
|
||||
<goal>wget</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<url>https://raw.githubusercontent.com/antlr/antlr4-csharp/master/tool/test/org/antlr/v4/test/runtime/csharp/BaseTest.java</url>
|
||||
<outputFileName>generated-sources/org/antlr/v4/test/runtime/csharp/BaseTest.java</outputFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add-test-source</id>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>add-test-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>target/generated-sources</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<antlr-python2-runtime>../../antlr4-python2/src</antlr-python2-runtime>
|
||||
<antlr-python3-runtime>../../antlr4-python3/src</antlr-python3-runtime>
|
||||
<antlr-csharp-runtime-project>../../antlr4-csharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.mono.csproj</antlr-csharp-runtime-project>
|
||||
<antlr-javascript-runtime>../../antlr4-javascript/src</antlr-javascript-runtime>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
11
tool/pom.xml
11
tool/pom.xml
|
@ -57,6 +57,17 @@
|
|||
</testResource>
|
||||
</testResources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr3-maven-plugin</artifactId>
|
||||
|
|
Loading…
Reference in New Issue