-
Notifications
You must be signed in to change notification settings - Fork 294
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
integration tests #253
integration tests #253
Conversation
Will enable CI in another PR later. |
15765ba
to
4f698b6
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.
Looks pretty good IMHO, just minor comments.
integration-tests/src/test/kotlin/com/google/devtools/ksp/test/TestsCommon.kt
Outdated
Show resolved
Hide resolved
integration-tests/src/test/kotlin/com/google/devtools/ksp/test/TestsCommon.kt
Outdated
Show resolved
Hide resolved
integration-tests/src/test/kotlin/com/google/devtools/ksp/test/TestsCommon.kt
Outdated
Show resolved
Hide resolved
fun OutputStream.appendText(str: String) { | ||
this.write(str.toByteArray()) | ||
} | ||
class BuilderProcessor : SymbolProcessor { |
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.
Do you get symbol resolution when writing these tests? If not, I'd consider moving them to a separate project, and make it depends on ksp
. Then you can publish these processors to the test repository, and just depend on them from the integration projects.
If there is already IDE support, feel free to ignore my comment.
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.
Good point. No, IDE doesn't work well with the processors. Will do in a separate patch after supporting specifying a single processor in a shared jar.
|
||
@Test | ||
fun testPlayground() { | ||
val gradleRunner = GradleRunner.create().withProjectDir(testProjectDir) |
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 haven't used GradleRunner
before. Does each test JVM fork starts its own Gradle daemon?
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.
According to the doc, yes, although I didn't verify it.
https://docs.gradle.org/current/userguide/test_kit.html#sec:controlling_the_build_environment
An observation from another perspective is that it's a bit slow to start. For integration tests that involves Gradle, I guess I can accept it, though.
No description provided.