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

Native testing breaks test cacheability #191

Closed
melix opened this issue Jan 12, 2022 · 0 comments · Fixed by #192
Closed

Native testing breaks test cacheability #191

melix opened this issue Jan 12, 2022 · 0 comments · Fixed by #192
Assignees
Labels
bug Something isn't working gradle-plugin Related to Gradle plugin

Comments

@melix
Copy link
Collaborator

melix commented Jan 12, 2022

If native testing is enabled (and it's enabled by default), then tests caching is broken. More specifically, tests executed from a different directory are not cached.

The Gradle build cache should be able to reuse test results, for example, if the project is checked out in a different directory. However, a system property is added which uses an absolute path:

test.systemProperty(JUNIT_PLATFORM_LISTENERS_UID_TRACKING_OUTPUT_DIR, testListDirectory.getAsFile().get());

This causes cache misses in case the project is used in a different directory.

@melix melix added bug Something isn't working gradle-plugin Related to Gradle plugin labels Jan 12, 2022
@melix melix self-assigned this Jan 12, 2022
melix added a commit that referenced this issue Jan 12, 2022
melix added a commit that referenced this issue Jan 12, 2022
@melix melix closed this as completed in #192 Feb 3, 2022
melix added a commit that referenced this issue Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gradle-plugin Related to Gradle plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant