Closed Karm closed 2 years ago
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
@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. Test methods run (or don't run) accordingly. Log file is verified (only the expected subset of test methods should have written to that file).
Error: org.graalvm.tests.integration.utils.versions.VersionsTest Time elapsed: 0.078 s <<< ERROR!
java.nio.file.NoSuchFileException: C:\Users\RUNNER~1\AppData\Local\Temp\versions-log
at org.graalvm.tests.integration.utils.versions.VersionsTest.teardown(VersionsTest.java:77)
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.
cp: cannot create regular file '/home/runner/.m2/settings.xml': No such file or directory
Error: Process completed with exit code 1.
?
Finally O.K. Squashed.
Tested examples: