Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration test for GraalVM Native Image #2466

Merged
merged 2 commits into from
Aug 13, 2023

Conversation

Marcono1234
Copy link
Collaborator

Purpose

Adds an integration test module for GaalVM Native Image, see also #2465 (comment)

Description

The integration test is a separate Maven module and uses the GraalVM Native Maven Plugin for test execution. Because Native Image tests require GraalVM as JDK, the Native Image test execution is opt-in (but run by the GitHub build workflow by default). By default the tests are only executed as regular unit tests.

Checklist

  • New code follows the Google Java Style Guide
  • If necessary, new public API validates arguments, for example rejects null
  • New public API has Javadoc
    • Javadoc uses @since $next-version$
      ($next-version$ is a special placeholder which is automatically replaced during release)
  • If necessary, new unit tests have been added
    • Assertions in unit tests use Truth, see existing tests
    • No JUnit 3 features are used (such as extending class TestCase)
    • If this pull request fixes a bug, a new test was added for a situation which failed previously and is now fixed
  • mvn clean verify javadoc:jar passes without errors

@Marcono1234
Copy link
Collaborator Author

@eamonnmcmanus, I hope the unit tests in the graal-native-image-test suffice for now, but feel free to suggest changes or additions to them.
And of course any other feedback regarding this pull request is welcome as well!

@Marcono1234 Marcono1234 force-pushed the marcono1234/native-image-test branch from 8258892 to b0d2b46 Compare August 12, 2023 23:54
@Marcono1234 Marcono1234 marked this pull request as draft August 13, 2023 00:20
Seems to improve build speed, and at least for the previous issue with
`RecordComponent` still causes test failures (as expected) if the fix
is reverted.
@Marcono1234 Marcono1234 marked this pull request as ready for review August 13, 2023 00:31
@eamonnmcmanus
Copy link
Member

This is amazing! Thanks so much for putting it together. We might end up refining it as we discover corner cases but I think it's already an excellent starting point.

@eamonnmcmanus eamonnmcmanus merged commit 26b5a66 into google:main Aug 13, 2023
@Marcono1234 Marcono1234 deleted the marcono1234/native-image-test branch August 13, 2023 15:50
tibor-universe pushed a commit to getuniverse/gson that referenced this pull request Sep 14, 2024
* Add integration test for GraalVM Native Image

* Enable 'quickBuild' mode

Seems to improve build speed, and at least for the previous issue with
`RecordComponent` still causes test failures (as expected) if the fix
is reverted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants