Ignore native bundle artifacts in ArtifactsTest

* kotlin-native not enabled by default in project
This commit is contained in:
Bogdan Mukvich
2024-02-06 16:58:50 +01:00
committed by Space Team
parent 112473f310
commit 555e374a33
@@ -27,6 +27,15 @@ class ArtifactsTest {
private val localRepoPath = Paths.get(mavenLocal, "org/jetbrains/kotlin")
private val expectedRepoPath = Paths.get("repo/artifacts-tests/src/test/resources/org/jetbrains/kotlin")
/**
* Kotlin native bundles are present in TC artifacts but should not be checked until kotlin native enabled project-wide
*/
private val nativeBundles = setOf(
"kotlin-native",
"kotlin-native-compiler-embeddable",
"kotlin-native-prebuilt",
)
private val excludedProjects = setOf(
"android-test-fixes",
"annotation-processor-example",
@@ -37,9 +46,6 @@ class ArtifactsTest {
"kotlin-gradle-subplugin-example",
"kotlin-java-example",
"kotlin-maven-plugin-test",
"kotlin-native",
"kotlin-native-compiler-embeddable",
"kotlin-native-prebuilt",
"org.jetbrains.kotlin.fus-statistics-gradle-plugin.gradle.plugin",
"org.jetbrains.kotlin.gradle-subplugin-example.gradle.plugin",
"org.jetbrains.kotlin.test.fixes.android.gradle.plugin",
@@ -53,8 +59,10 @@ class ArtifactsTest {
val expectedPomPath = actual.toExpectedPath()
DynamicTest.dynamicTest(expectedPomPath.fileName.toString()) {
if ("${expectedPomPath.parent.fileName}" !in excludedProjects) {
val actualString = actual.toFile().readText().replace(kotlinVersion, "ArtifactsTest.version")
assertEqualsToFile(expectedPomPath, actualString)
if ("${expectedPomPath.parent.fileName}" !in nativeBundles) {
val actualString = actual.toFile().readText().replace(kotlinVersion, "ArtifactsTest.version")
assertEqualsToFile(expectedPomPath, actualString)
}
} else {
if (isTeamCityBuild) fail("Excluded project in actual artifacts: $actual")
}