-
Notifications
You must be signed in to change notification settings - Fork 412
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
KT-64377 use Java Test Suites for Gradle integration tests #3427
Conversation
…3418) * remove Gradle wrapper files for integration test projects * .gitignore Gradle wrapper files
…egration-test-build-config
…ity (#3420) rename 'tryK2' to 'useK2' for integration tests
# Conflicts: # dokka-integration-tests/gradle/projects/it-wasm-basic/gradle.properties
…egration-test-build-config
2f78af9
to
9d36bbd
Compare
- create a test suite for each project under test (helps with Gradle caching, task avoidance) - update CI/CD tasks to run specific test-suite tasks - disable integration test tasks due to dependency on Maven Local publishing (this will be fixed in an upcoming PR)
9d36bbd
to
10fe4b5
Compare
# Conflicts: # build-logic/src/main/kotlin/dokkabuild/DokkaBuildProperties.kt # dokka-integration-tests/gradle/README.md # dokka-integration-tests/gradle/build.gradle.kts # dokka-integration-tests/utilities/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
I don't know why
I guess this is the code that's failing https://github.com/Kotlin/kotlinx.serialization/blob/8baa04b4259274305eea6b02f5c5590b44ea126c/gradle/native-targets.gradle#L102 Is the test important? EDIT I saw the KDoc on NonCacheableIntegrationTest and remembered about EDIT2
The actual problem is because KxS uses Using JVM11 to test KxS is a simple fix, that's now implemented. The test should pass now. |
4c52c05
to
57b93cf
Compare
a8c8e86
to
84255e2
Compare
…plateProjectDir for better error messages
build.gradle.kts
Outdated
@@ -6,6 +6,10 @@ plugins { | |||
id("dokkabuild.base") | |||
} | |||
|
|||
tasks.check { |
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.
Sorry, but I strongly believe that check
or test
or any other similar basic task should not run anything as heavyweight / complicated as all of Dokka's "integration tests".
I don't know if the reworked tests have the same problems as the current ones, but now you are unable to run integration tests locally if you
- didn't initialize git submodules (not done by default, fails with obscure errors like "unable to find a file")
- don't have Android SDK installed (the android test is executed regardless)
- have less than 32gb of ram
- can't leave some hungry process running for 1h (I had to close my IDEs and chrome to run tests when I had 16gb of ram, and it still didn't work half the time)
If you do manage to run these tests and they fail, it's not obvious at all to external contributors or members without context as to what to do about it and how to fix it (especially if it's a false positive or is expected), so for them it's virtually useless.
Integration tests were run by default before, and it was very annoying for the reasons outlined by Oleg. I ran pretty much every build with test -x integrationTest
, but it might be impossible after this change because there's no taskgraph between tasks of included builds (all the addDependencyOnSameTasksOfIncludedBuilds
calls), so they will be run whether you want it or not
As a side note (not a requirement or a comment for this PR specifically, there's no need to implement it).
Ideally, I think the workflow should be the following:
- run basic checks locally (<= 1-2 min)
- push a commit that triggers more complex CI checks (smoke, <= 30m), merge the PR
- even more complex CI checks are triggered for every commit in master / nightly / manually (>= 30m)
This idea was mentioned in #2925 (comment):
The current integration tests take 1h+ to run, which is painful in PRs and hogs CI agents. There should be a a differentiation between "full tests" that run everything, and their subset in the form of "smoke tests", that only test specific versions (maybe only the latest) or projects (maybe only 2 out of 10 user projects). Smoke tests are intended to be run for commits in PRs, and full tests - overnight or triggered manually.
...ts/gradle/src/testExternalProjectKotlinxCoroutines/kotlin/CoroutinesGradleIntegrationTest.kt
Outdated
Show resolved
Hide resolved
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.
In general, LGTM 👍
…suites # Conflicts: # dokka-integration-tests/gradle/build.gradle.kts
…ific to the external projects
…achines (helps with remote Build Cache)
Restructure Gradle Integration tests to use Java Test Suites
Contains:
KT-64377 - automatically download and setup Android SDK in Gradle Integration Test #3419