Skip to content

Commit

Permalink
Replace bash JavaTest.sh with mvn test (#7500)
Browse files Browse the repository at this point in the history
* Start of mvn-ification of the test

* move to right locations

* Update the IO done in the test to read from resources / write to temp folders

* Add github workflow attempt to mvn test it instead of JavaTest.sh

* Pin the Kotlin benchmark's symlink for /java to the right location

* Inline equality assertions and format JavaTest.java

* fix android gradle source directory

Co-authored-by: Derek Bailey <derekbailey@google.com>
  • Loading branch information
nick-someone and dbaileychess committed Sep 12, 2022
1 parent c49aff4 commit 89dfb43
Show file tree
Hide file tree
Showing 39 changed files with 617 additions and 707 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -358,8 +358,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: test
working-directory: tests
run: bash JavaTest.sh
working-directory: java
run: mvn test

build-kotlin-macos:
name: Build Kotlin MacOS
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -88,6 +88,7 @@ java/*.iml
.idea
*.iml
target
java/target
**/*.pyc
build/VS2010/FlatBuffers.sdf
build/VS2010/FlatBuffers.opensdf
Expand Down Expand Up @@ -148,4 +149,4 @@ flatbuffers.pc
**/html/**
**/latex/**
# https://cmake.org/cmake/help/latest/module/FetchContent.html#variable:FETCHCONTENT_BASE_DIR
_deps/
_deps/
2 changes: 1 addition & 1 deletion android/app/build.gradle
Expand Up @@ -21,7 +21,7 @@ android {
sourceSets {
main {
java {
srcDir '../../java'
srcDir '../../java/src/main/java/'
}
}
}
Expand Down
35 changes: 27 additions & 8 deletions pom.xml → java/pom.xml
Expand Up @@ -37,6 +37,18 @@
<tag>HEAD</tag>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>1.1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<snapshotRepository>
Expand All @@ -45,7 +57,21 @@
</snapshotRepository>
</distributionManagement>
<build>
<sourceDirectory>java</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
<testExcludes>
<testExclude>**/LongEnum.java</testExclude>
<testExclude>MyGame/Example/MonsterStorageGrpc.java</testExclude>
<testExclude>MyGame/Example/StructOfStructs**</testExclude>
<testExclude>MyGame/OtherNameSpace/TableBT.java</testExclude>
</testExcludes>
</configuration>
<version>3.8.1</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
Expand All @@ -55,13 +81,6 @@
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
</configuration>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions java/src/test/java/DictionaryLookup

0 comments on commit 89dfb43

Please sign in to comment.