Add function to make a snapshot of current test project

This will allow checking current state of test project and try
to work with it directly.

^KT-45745 In Progress
This commit is contained in:
Yahor Berdnikau
2021-12-08 17:12:00 +01:00
parent 6fed67b36c
commit 1c8a1e656e
4 changed files with 130 additions and 27 deletions
@@ -88,7 +88,7 @@ add a new assertion, add as a reviewer someone from Kotlin build tools team.
##### Additional test helpers
Whenever you need to test combination of different JDKs and Gradle versions - you could use `@GradleWithJdkTest` instead of `@GradleTest`.
- Whenever you need to test combination of different JDKs and Gradle versions - you could use `@GradleWithJdkTest` instead of `@GradleTest`.
Then test method will receive requires JDKs as a second parameter:
```kotlin
@JdkVersions(version = [JavaVersion.VERSION_11, JavaVersion.VERSION_17])
@@ -103,6 +103,8 @@ fun someTest(
}
```
- If you want to copy current state of the test project and play with it separately - you could use `makeSnapshotTo(destinationPath)` function.
##### Common test fixes
Test infrastructure adds following common fixes to all test projects: