[BTA tests] Split test infra and actual tests
^KT-61860 In Progress
This commit is contained in:
committed by
Space Team
parent
b5fbb3f925
commit
8051fa56f2
@@ -10,6 +10,12 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(kotlinStdlib())
|
api(kotlinStdlib())
|
||||||
|
compileOnly(project(":kotlin-tooling-core")) // to reuse `KotlinToolingVersion`
|
||||||
|
compileOnly(project(":compiler:build-tools:kotlin-build-tools-api"))
|
||||||
|
|
||||||
|
api(platform(libs.junit.bom))
|
||||||
|
compileOnly(libs.junit.jupiter.engine)
|
||||||
|
compileOnly(libs.junit.jupiter.params)
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
@@ -32,6 +38,12 @@ class BuildToolsApiTestSuit(
|
|||||||
)
|
)
|
||||||
|
|
||||||
val testMatrix = listOf(
|
val testMatrix = listOf(
|
||||||
|
BuildToolsApiTestSuit(
|
||||||
|
"example",
|
||||||
|
BuildToolsVersion(KotlinToolingVersion(project.version.toString()), isCurrent = true),
|
||||||
|
BuildToolsVersion(KotlinToolingVersion(project.version.toString()), isCurrent = true),
|
||||||
|
onlyCompatibilityTests = false,
|
||||||
|
),
|
||||||
BuildToolsApiTestSuit(
|
BuildToolsApiTestSuit(
|
||||||
"testSnapshotToSnapshot",
|
"testSnapshotToSnapshot",
|
||||||
BuildToolsVersion(KotlinToolingVersion(project.version.toString()), isCurrent = true),
|
BuildToolsVersion(KotlinToolingVersion(project.version.toString()), isCurrent = true),
|
||||||
@@ -104,9 +116,11 @@ testing {
|
|||||||
dependencies {
|
dependencies {
|
||||||
useJUnitJupiter(libs.versions.junit5.get())
|
useJUnitJupiter(libs.versions.junit5.get())
|
||||||
|
|
||||||
compileOnly(project()) // propagate stdlib from the main dependencies for compilation,
|
compileOnly(project()) // propagate stdlib from the main dependencies for compilation, the runtime dependency provides the actual required version
|
||||||
// the runtime dependency provides the actual required version
|
implementation(project()) {
|
||||||
implementation(project(":kotlin-tooling-core")) // to reuse `KotlinToolingVersion`
|
isTransitive = false
|
||||||
|
}
|
||||||
|
implementation(project(":kotlin-tooling-core"))
|
||||||
|
|
||||||
if (suitConfig.apiVersion.isCurrent) {
|
if (suitConfig.apiVersion.isCurrent) {
|
||||||
compileOnly(project(":compiler:build-tools:kotlin-build-tools-api"))
|
compileOnly(project(":compiler:build-tools:kotlin-build-tools-api"))
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ class Project(
|
|||||||
val moduleDirectory = projectDirectory.resolve(moduleName)
|
val moduleDirectory = projectDirectory.resolve(moduleName)
|
||||||
val module = JvmModule(this, moduleName, moduleDirectory, dependencies, additionalCompilationArguments)
|
val module = JvmModule(this, moduleName, moduleDirectory, dependencies, additionalCompilationArguments)
|
||||||
module.sourcesDirectory.createDirectories()
|
module.sourcesDirectory.createDirectories()
|
||||||
val templatePath = Paths.get("src/testCommon/resources/modules/$moduleName")
|
val templatePath = Paths.get("src/main/resources/modules/$moduleName")
|
||||||
assert(templatePath.isDirectory()) {
|
assert(templatePath.isDirectory()) {
|
||||||
"Template for $moduleName not found. Expected template directory path is $templatePath"
|
"Template for $moduleName not found. Expected template directory path is $templatePath"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user