Closed ericvergnaud closed 9 months ago
I tried to run the tests locally, I am not sure if the PR is expected to fix running tests, but just in case this is useful this is what I get.
I tried to:
git clean -fdX && mvn clean
)mvn install -DskipTests=true -Darguments="-Dmaven.javadoc.skip=true" -B -V
mvn test
This fails locally:
[INFO] ANTLR 5 ............................................ SUCCESS [ 0.224 s]
[INFO] ANTLR 5 Runtime .................................... SUCCESS [ 4.604 s]
[INFO] ANTLR 5 Kotlin Runtime ............................. SUCCESS [ 17.654 s]
[INFO] ANTLR 5 Tool ....................................... SUCCESS [ 5.553 s]
[INFO] ANTLR 5 Maven plugin ............................... FAILURE [ 5.269 s]
[INFO] ANTLR 5 Runtime Tests (4th generation) ............. SKIPPED
[INFO] ANTLR 5 Tool Tests ................................. SKIPPED
If I then move into runtime tests and run mvn test
. I get some failues.
For example:
[ERROR] Tests run: 663, Failures: 28, Errors: 0, Skipped: 0, Time elapsed: 73.374 s <<< FAILURE! - in org.antlr.v5.test.runtime.java.api.TestExpectedTokens
If I then move into tool tests and run mvn test
that succeeds.
Thanks We'll have to understand why the runtime tests fail locally when they succeed in the CI, but that's progress
If I run:
mvn -Dtest='java.**' test
or
mvn -Dtest='kotlin.**' test
I suspect that mvn test
fails because it also tries running ts/js tests, which haven't been migrated.
(we're only keeping the code here for later use)
I am in the middle of relocating so I will be out until next week. But I hve locally revamped the whole Maven stuff and fixed the build anomalies. I'll have to check it. There is also an old plugin that I will have to rewrite as it is for an older version of Maven. Hopefully I can get back to this soon.
Jim
On Wed, Feb 7, 2024 at 7:23 AM ericvergnaud @.***> wrote:
@ftomassetti https://github.com/ftomassetti this works for me, can you check the same ?
(this PR doesn't fix the maven plugin tests, which would require help from @jimidle https://github.com/jimidle)
You can view, comment on, or merge this pull request online at:
https://github.com/antlr/antlr5/pull/27 Commit Summary
- 32c4346 https://github.com/antlr/antlr5/pull/27/commits/32c43469c1b9310b376ddb3e0ad363b5c564bdb7 rename for consistency
- 8b1e1da https://github.com/antlr/antlr5/pull/27/commits/8b1e1da27a856baa45fe96c64857ac354b02b9ba fix build order
- a57a273 https://github.com/antlr/antlr5/pull/27/commits/a57a273c6fb019f8c76a16a564613a8dcfcfd7f9 fix remaining v4 names
- 52a8e03 https://github.com/antlr/antlr5/pull/27/commits/52a8e03bafbcabd4bb976b38ab38c1e3bb3bd55c fix test sources dir
File Changes
(12 files https://github.com/antlr/antlr5/pull/27/files)
- M antlr5-maven-plugin/pom.xml https://github.com/antlr/antlr5/pull/27/files#diff-fbca1944130e6d589f9dddb93d1b80c9164a621a1f0cb801fde045b15e36a6e4 (2)
- M antlr5-maven-plugin/src/main/java/org/antlr/mojo/antlr5/Antlr5Mojo.java https://github.com/antlr/antlr5/pull/27/files#diff-c7a16112855af975b2f14a78becdce27dcaf377a629d81330a7905e7433d04f0 (2)
- M antlr5-maven-plugin/src/site/apt/examples/libraries.apt.vm https://github.com/antlr/antlr5/pull/27/files#diff-1a7284280a74b4f4807978f2ce6abdc764cb592ab8baeb280f68f551cb59ff0c (2)
- M antlr5-maven-plugin/src/site/apt/index.apt https://github.com/antlr/antlr5/pull/27/files#diff-934f83cd731b078c568146e15106e38dbbed3aad3f592562f076c1ea4c514ba6 (4)
- M antlr5-maven-plugin/src/site/apt/usage.apt.vm https://github.com/antlr/antlr5/pull/27/files#diff-e522e412a6fd946160820971d46ecddbc3cc3e962505482c3c6883dd2fd6ecbb (2)
- M antlr5-maven-plugin/src/site/site.xml https://github.com/antlr/antlr5/pull/27/files#diff-ba1ed912e0b025aec44e7db5cf8034077e0d6226ffc007a5327de69b53d33cb4 (2)
- M antlr5-maven-plugin/src/test/java/org/antlr/mojo/antlr5/Antlr5MojoTest.java https://github.com/antlr/antlr5/pull/27/files#diff-27968e05a2b01234fb03e89bd7c0b200528199b0e941b027cd7ba0c500846c1c (2)
- M pom.xml https://github.com/antlr/antlr5/pull/27/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8 (2)
- R runtime-testsuite/test/org/antlr/v5/test/runtime/kotlin/commonTest/org/antlr/v5/runtime/kotlin/BitSetTest.kt https://github.com/antlr/antlr5/pull/27/files#diff-cd6b32305df280719f61f1cd0fedc149389847cad47758a66dddd340581c796a (2)
- R runtime-testsuite/test/org/antlr/v5/test/runtime/kotlin/commonTest/org/antlr/v5/runtime/kotlin/CharStreamsTest.kt https://github.com/antlr/antlr5/pull/27/files#diff-ddfc3f2ba5b3ade06a7dbbc67dfa5488a5030dc27ff2397f3cb60512be3cd090 (0)
- R runtime-testsuite/test/org/antlr/v5/test/runtime/kotlin/commonTest/org/antlr/v5/runtime/kotlin/StringCharStreamTest.kt https://github.com/antlr/antlr5/pull/27/files#diff-be974fe9c1e920581690a3cbd3de2627dc3b0a1f442aaac571f2452bec4652a2 (0)
- R runtime-testsuite/test/org/antlr/v5/test/runtime/kotlin/commonTest/org/antlr/v5/runtime/kotlin/misc/IntegerListTest.kt https://github.com/antlr/antlr5/pull/27/files#diff-2a3a75a84bb8dd2198d6be456a4b43ee9bcfba6851e072259bf624f4a7ea5611 (0)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/antlr/antlr5/pull/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ7TMDUNVSPT3IDM4DRLV3YSO2C3AVCNFSM6AAAAABC6AX2HKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDGMRXG43DEOI . You are receiving this because you were mentioned.Message ID: @.***>
Just as an update, I get the exact same results from two different machines (both macs)
I'll give it ago this afternoon, let's see if I can repro too.
I can run tests correctly with:
cd runtime-testsuite
mvn -Dtest=kotlin.** test
mvn -Dtest=java.** test
Which is what CI does.
Running mvn test
fails tho, it seems on JS tests, which we don't need anyway.
Yes, that works (with the slight changes of adding " around the -Dtest parameter).
Are instead the tests of the maven plugin expected to fail?
Are instead the tests of the maven plugin expected to fail?
Plugin's tests use takari-plugin-testing, which received its last meaningful update more than three years ago. At this point testing with anything above Maven 3.6 is likely to fail.
@ftomassetti this works for me, can you check the same ?
(this PR doesn't fix the maven plugin tests, which would require help from @jimidle)