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

Configure Github CI to run tests on Windows #75

Merged
merged 1 commit into from
Apr 29, 2021

Conversation

Sgitario
Copy link
Contributor

@Sgitario Sgitario commented Apr 22, 2021

Changes:

  1. I'm ignoring these errors when the directory can't be deleted (it's not Quarkus issue)
  2. I splitted the "s p a c e s" runs into there different folders for jvm, native and dev mode.

@Sgitario Sgitario force-pushed the support-windows branch 3 times, most recently from 7e41318 to 72b1fc1 Compare April 22, 2021 09:21
@Sgitario Sgitario force-pushed the support-windows branch 7 times, most recently from 7a902be to 0be3168 Compare April 23, 2021 10:03
@Sgitario
Copy link
Contributor Author

1.11.X is not working on Native in Windows due to quarkusio/quarkus#7990. Therefore, we need to upgrade to 1.13.X to make Windows work on Native: #76

@Sgitario Sgitario force-pushed the support-windows branch 7 times, most recently from 67569d4 to 7a68c8c Compare April 28, 2021 07:56
@Test
public void spacesJVM(TestInfo testInfo) throws IOException, InterruptedException {
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.JVM, "s p a c e s");
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.JVM, "s p a c e s j v m");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation about this change in PR description

if (appDestDir.exists()) {
FileUtils.deleteDirectory(appDestDir);
}
removeDirWithSpecialCharacters(appDestDir);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation about this change in PR description

}

@Test
public void spacesDEV(TestInfo testInfo) throws IOException, InterruptedException {
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.DEV, "s p a c e s");
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.DEV, "s p a c e s d e v");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation about this change in PR description

}

@Test
@Tag("native")
public void spacesNative(TestInfo testInfo) throws IOException, InterruptedException {
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "s p a c e s");
testRuntime(testInfo, Apps.JAX_RS_MINIMAL, MvnCmds.NATIVE, "s p a c e s n a t i v e");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation about this change in PR description

@Sgitario Sgitario requested a review from rsvoboda April 28, 2021 08:28
@Sgitario Sgitario marked this pull request as ready for review April 28, 2021 08:28
.github/workflows/ci.yaml Outdated Show resolved Hide resolved
}

for (Pattern ignoredLine : ignoredLines) {
offendingLines.removeIf(line -> ignoredLine.matcher(line).matches());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No auditing what gets skipped

Pattern.compile(".*Uber JAR strategy is used for native image source JAR generation on Windows.*"),
Pattern.compile(".*Duplicate entry about.html entry.*"),
Pattern.compile(".*Dependencies with duplicate files detected.*"),
Pattern.compile(".*objcopy executable not found in PATH. Debug symbols will not be separated from executable.*"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the same issue handled a bit differently - https://github.com/quarkus-qe/quarkus-startstop/blob/main/testsuite/src/it/java/io/quarkus/ts/startstop/utils/WhitelistLogLines.java#L88

TBH I'm not sure if we need to handle special WINDOWS_COMMON / WINDOWS_DEV_MODE_ERRORS / WINDOWS_NATIVE.
I would just go with the platformErrs approach, merge ^^^ into one array

@Sgitario
Copy link
Contributor Author

Sgitario commented Apr 28, 2021

PR updated with the following changes:

  • Move Windows whitelisted errors into the existing platformErrs approach
  • Not to ignore SLF4J errors. If this happens again with Windows, it will fail.

I will mark all the comments as resolved once I'm happy with the new changes and the CI passes.

@Sgitario Sgitario requested a review from rsvoboda April 28, 2021 12:37
@Sgitario
Copy link
Contributor Author

@rsvoboda would you mind to take another look? I moved the windows errors to platform windows errors, but kept the ones about dev console as this is an issue that should be removed once solved.
About the slf4j errors, this is not whitelisted any longer, so if it happens again, the test will fail as expected.

@Sgitario
Copy link
Contributor Author

PR updated to move some shared constants between Windows and Mac.

@Sgitario Sgitario requested a review from rsvoboda April 28, 2021 12:54
@Sgitario
Copy link
Contributor Author

I've updated the PR to whitelist the "unable to create directory for vert.x cache" error only for Windows. This is reported by quarkusio/quarkus#16895.

Changes:
- Windows fails to stop an application when running on DEV mode. Reported issue: quarkusio/quarkus#14647
- Windows disallows to delete folders when they are being used by the file explorer or the processes are about to be exited. This is why:
1. I'm ignoring these errors when the directory can't be deleted (it's not Quarkus issue)
2. I splitted the "s p a c e s" runs into there different folders for jvm, native and dev mode.
@rsvoboda rsvoboda merged commit 9bc32ea into quarkus-qe:main Apr 29, 2021
@Sgitario Sgitario deleted the support-windows branch April 29, 2021 07:31
Sgitario added a commit to Sgitario/quarkus-startstop that referenced this pull request May 5, 2021
Backport of quarkus-qe#75.
Won't run Native as it's not working on 1.11 due to quarkusio/quarkus#14904
Sgitario added a commit to Sgitario/quarkus-startstop that referenced this pull request May 10, 2021
Backport of quarkus-qe#75.
Won't run Native as it's not working on 1.11 due to quarkusio/quarkus#14904
rsvoboda pushed a commit that referenced this pull request May 11, 2021
Backport of #75.
Won't run Native as it's not working on 1.11 due to quarkusio/quarkus#14904
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