Ignore compose experimental modules during artifacts check
The check can be improved in the future, so not only parent directory is checked.
This commit is contained in:
committed by
Space Team
parent
887dc18719
commit
a1250e838b
@@ -22,6 +22,16 @@ class ArtifactsTest {
|
|||||||
private val localRepoPath = Paths.get(mavenLocal, "org/jetbrains/kotlin")
|
private val localRepoPath = Paths.get(mavenLocal, "org/jetbrains/kotlin")
|
||||||
private val expectedRepoPath = Paths.get("repo/artifacts-tests/src/test/resources/org/jetbrains/kotlin")
|
private val expectedRepoPath = Paths.get("repo/artifacts-tests/src/test/resources/org/jetbrains/kotlin")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Experimental projects that might be published locally but are not epxected to be published by default.
|
||||||
|
* They still might be added to TeamCity maven.zip final artifacts with an additional code.
|
||||||
|
*/
|
||||||
|
private val experimentalProjects = setOf(
|
||||||
|
"compiler-hosted",
|
||||||
|
"compiler-daemon",
|
||||||
|
"compiler",
|
||||||
|
)
|
||||||
|
|
||||||
private val excludedProjects = setOf(
|
private val excludedProjects = setOf(
|
||||||
"annotation-processor-example",
|
"annotation-processor-example",
|
||||||
"android-test-fixes",
|
"android-test-fixes",
|
||||||
@@ -51,12 +61,16 @@ class ArtifactsTest {
|
|||||||
})
|
})
|
||||||
actualPoms.forEach { actual ->
|
actualPoms.forEach { actual ->
|
||||||
val expectedPomPath = actual.toExpectedPath()
|
val expectedPomPath = actual.toExpectedPath()
|
||||||
if ("${expectedPomPath.parent.fileName}" !in excludedProjects) {
|
val parentDirName = expectedPomPath.parent.fileName.toString()
|
||||||
val actualString = actual.toFile().readText().replace(kotlinVersion, "ArtifactsTest.version")
|
|
||||||
assertEqualsToFile(expectedPomPath, actualString)
|
if (parentDirName !in experimentalProjects) {
|
||||||
visitedPoms.add(expectedPomPath)
|
if (parentDirName !in excludedProjects) {
|
||||||
} else {
|
val actualString = actual.toFile().readText().replace(kotlinVersion, "ArtifactsTest.version")
|
||||||
if (isTeamCityBuild) fail("Excluded project in actual artifacts: $actual")
|
assertEqualsToFile(expectedPomPath, actualString)
|
||||||
|
visitedPoms.add(expectedPomPath)
|
||||||
|
} else {
|
||||||
|
if (isTeamCityBuild) fail("Excluded project in actual artifacts: $actual")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user