-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adds minJDK and maxJDK to IfMandrelVersion annotation #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks @Karm .
One question though, why don't you include the unit tests in the PR as well?
I didn't want to fall into the rabbit hole of mocking classes or providing fake native-image command on PATH to properly test the test suite. The annotation is evaluated early. You gently pushed me into that rabbit hole now, so I'll try to include those tests without adding much overhead... :-D |
851d10c
to
cf047ae
Compare
@zakkak Tests added: https://github.com/Karm/mandrel-integration-tests/pull/88/files#diff-85646c56861bc740418a91c2da8cc67d41ce46b7cf583216e71e50f1d64e8de0 It creates a fake native-image command that spits out one predefined version. |
Hmm, it passes just fine on my Windows VM, so this might be some GH setup...like "don't use Temp" ? |
I see what's wrong. One cannot run it with the rest of the tests, because org.graalvm.tests.integration.utils.versions.UsedVersion is immutably set an the fake native-image version is then used for the rest of the TS. I will make a separate GH workflow just for this. |
728ffcf
to
ab26d1d
Compare
? |
Tested examples: ```java @test @tag("jdkVersionTest") @order(1) @IfMandrelVersion(min = "21.3.1") public void jdkVersionCheckA(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } @test @tag("jdkVersionTest") @order(2) @IfMandrelVersion(min = "21.3.1", minJDK = "17") public void jdkVersionCheckB(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } @test @tag("jdkVersionTest") @order(3) @IfMandrelVersion(min = "22", minJDK = "17") public void jdkVersionCheckC(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } @test @tag("jdkVersionTest") @order(4) @IfMandrelVersion(min = "22", minJDK = "17.0.2") public void jdkVersionCheckD(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } @test @tag("jdkVersionTest") @order(5) @IfMandrelVersion(min = "22", minJDK = "17", maxJDK = "17.0.2") public void jdkVersionCheckE(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } @test @tag("jdkVersionTest") @order(6) @IfMandrelVersion(min = "21", minJDK = "11.0.12", maxJDK = "17.0.1") public void jdkVersionCheckF(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } @test @tag("jdkVersionTest") @order(7) @IfMandrelVersion(min = "21", maxJDK = "11") public void jdkVersionCheckG(TestInfo testInfo) { System.out.println("KARM Running test "+testInfo.getTestMethod()); } ``` Adds VersionTests Disables VersionsTest on Windows, GH Windows behave strangely WRT Temp dir Separate GH workflow for Versions tests, Windows included ~/.m2/ might not exist if there is no cache ~/.m2 might not exist on new workflow
6b90d6f
to
dcaadea
Compare
Finally O.K. Squashed. |
Tested examples: