[tests] Minor: add support of DevKit in Gradle IT

This should provide some nicities in IDEA like folders for navigating
to testData
This commit is contained in:
Dmitry Savvinov
2023-03-15 17:16:31 +01:00
committed by Space Team
parent e95b8b843b
commit 31eb012b6b
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.gradle.testbase
import com.intellij.testFramework.TestDataPath
import org.jetbrains.kotlin.test.WithMuteInDatabase
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.TestInstance
@@ -13,13 +14,23 @@ import java.nio.file.Path
/**
* Base class for all Kotlin Gradle plugin integration tests.
*
* @[TestDataPath] helps DevKit IDE Plugin to find "related testData".
* It provides various IDE-assistance (e.g. "NavigateToTestData"-actions and gutter icons)
* For the test named 'testFoo' the "related testData" will be checked at:
* '<argument-of-@TestDataPath>/foo'
*
* If the test uses a name that doesn't correspond to the testdata, you can add
* @org.jetbrains.kotlin.test.TestMetadata("<path relative to resources/testProject">)
*
*/
@Tag("JUnit5")
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
@WithMuteInDatabase
@TestDataPath("\$CONTENT_ROOT/resources/testProject")
abstract class KGPBaseTest {
open val defaultBuildOptions = BuildOptions()
@TempDir
lateinit var workingDir: Path
}
}