-
Notifications
You must be signed in to change notification settings - Fork 393
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
Update Maven Integration Tests to use JVM Test Suites #3581
base: master
Are you sure you want to change the base?
Conversation
- Migrate the CLI integration tests away from the custom integration test convention (which are not build-cache compatible) to use JVM Test Suites. - Remove shadowing, replace with passing in the JARs via system properties. (a custom CommandLineArgumentProvider is confusing and overly complicated, but it's required to satisfy Gradle input normalization, so that the build-cache can be re-used.) - Simplify `processUtils.kt` - the coroutines logic isn't necessary since the entrypoint just used `runBlocking {}`. - move `jsonBuilder.kt` test-util into `src/main`, since it's not a test - Rename `CliIntegrationTest` to `CliTest` (it wasn't an integration test, and the name was confusing compared to the actual `CliIntegrationTest`)
… re-write a shared file in resources
Part of KT-64200 WIP
8b6dba6
to
16278e0
Compare
…aven-jvm-test-suite
e4cddd5
to
5a63254
Compare
- Re-introduce shared integration-test convention plugin, to de-duplicate common IT config. - Add util for adding system properties & registering the values as appropriate Gradle task inputs. (This required replacing env-vars with system props.)
Refactor `fun MutableList<CommandLineArgumentProvider>.systemProperty()` to be more consistent with the other systemProperty utils, and so the intention is clearer.
0939e5d
to
b887dc5
Compare
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
a side note: would be nice to move test projects from the project level directory projects
to the resources of the related test suit source set
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.
just some minor things after latest commits :)
build-logic/src/main/kotlin/dokkabuild/DevMavenPublishExtension.kt
Outdated
Show resolved
Hide resolved
* because such a property might disrupt task caching.) | ||
* | ||
* If you want to register the property as a Task input, use the | ||
* [Test.systemProperty][dokkabuild.utils.systemProperty] above instead. |
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.
should be rephrased now
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, how do you think it could be rephrased?
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.
I mean, it's now a function inside an object which is created by [Test.systemProperty]
, so may be suggesting just using other property will be more appropriate here, like:
* [Test.systemProperty][dokkabuild.utils.systemProperty] above instead. | |
* [inputProperty] above instead. |
KT-64200
Updates
dokka-integration-tests/maven
to use jvm-test-suitesDe-duplicates integration-test configuration into the
dokkabuild.test-integration.gradle.kts
convention plugin.integrationTest
tocliIntegrationTest
to avoid clashing with theintegrationTest
lifecycle task.Implement a new utility for passing in system properties to test tasks, and correctly registering them as Gradle inputs.
Using System Properties is preferred to environment variables, because they are easier to register as Gradle task inputs.