Skip to content

[Gradle] Add integration tests for KMP empty and non-test source sets - #7617

Open
Yermukhamed Shakhman (ermawqa-jetbrains) wants to merge 4 commits into
masterfrom
yermukhamed/kmp-empty-test-source-sets-integration-tests
Open

[Gradle] Add integration tests for KMP empty and non-test source sets#7617
Yermukhamed Shakhman (ermawqa-jetbrains) wants to merge 4 commits into
masterfrom
yermukhamed/kmp-empty-test-source-sets-integration-tests

Conversation

@ermawqa-jetbrains

Copy link
Copy Markdown
Contributor

Summary

Added MppEmptyTestSourceSetsIT to verify KMP test execution and discovery across empty, non-test, and inherited test source set layouts.

Changes

  • Added MppEmptyTestSourceSetsIT covering:
    • No test sources: Verifies :compileTestKotlinJvm and :jvmTest are NO_SOURCE and produce no test results.
    • Sources without tests: Verifies :jvmTest fails on Gradle 9.0+ when compiled classes contain zero @Test methods.
    • Common test discovery & inheritance: Verifies test execution from commonTest and subclass inheritance in jvmTest.
  • Added assertNoTestResultsProduced assertion helper in testAssertions.kt.

P.S: keeping it JVM-only is intentional to keep execution fast and lightweight, as KMP source set hierarchy propagation and NO_SOURCE optimizations are target-agnostic. Native targets use different test runner tasks (KotlinNativeHostTest) and require heavy toolchains.

^KQA-3433

@kodee-bot

kodee-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

Hi! It looks like there are no references to any YT issues in the commit messages.
If the change is non-functional, feel free to ignore the comment :)
Otherwise, please add them as requested in the guideline.

@kotlin-safemerge

kotlin-safemerge Bot commented Aug 20, 2026

Copy link
Copy Markdown

Code Owners

RuleOwnersApproval
/​libraries/​tools/​kotlin-​gradle-​plugin-​integration-​tests/​
kotlin-build-tools

Egorand 🔒
PR commands for maintainers
CommandDescriptionParameters
/safe-mergeRebase-merges with automatic fixup commit squashing--fixup Autosquash fixup commits (on by default)
/safe-squash-mergeSquash-merges with optional commit title/body override--title Title of the squashed commit
--message Body of the squashed commit
/dry-runRuns the test pipeline with changes rebased on latest master--retry Retry the CI run on failure
/test-publicTriggers the public test suite without rebasing on latest master
/test-privateTriggers the private test suite without rebasing on latest master
/codeownersTriggers code owners check and comment update
/fixupSquashes fixup commits and force pushes the branch
/cancel-coordinatorCancels the merge coordinator currently running for this branch

@Egorand Egor Andreevich (Egorand) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

/final

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