skipping tests that using "touch" modification, since gradle do not consider mere timestamp touching as a change and do not call kotlin plugin on it
KT-8487
This commit is contained in:
committed by
Alexey Tsvetkov
parent
c5617f1274
commit
a1ddbb3fe5
+7
-4
@@ -178,8 +178,9 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private val knownExtensions = arrayListOf("kt", "java")
|
private val supportedSourceExtensions = arrayListOf("kt", "java")
|
||||||
private val knownModifyExtensions = arrayListOf("new", "touch", "delete")
|
private val supportedModifyExtensions = arrayListOf("new", "delete")
|
||||||
|
private val unsupportedModifyExtensions = arrayListOf("touch")
|
||||||
|
|
||||||
private fun String.toIntOr(defaultVal: Int): Pair<Int, Boolean> {
|
private fun String.toIntOr(defaultVal: Int): Pair<Int, Boolean> {
|
||||||
try {
|
try {
|
||||||
@@ -202,10 +203,12 @@ fun testIsKnownJpsTestProject(projectRoot: File): Pair<Boolean, String?> {
|
|||||||
val (fileStage, hasStage) = nameParts.last().toIntOr(0)
|
val (fileStage, hasStage) = nameParts.last().toIntOr(0)
|
||||||
val modifyExt = nameParts[nameParts.size - (if (hasStage) 2 else 1)]
|
val modifyExt = nameParts[nameParts.size - (if (hasStage) 2 else 1)]
|
||||||
val ext = nameParts[nameParts.size - (if (hasStage) 3 else 2)]
|
val ext = nameParts[nameParts.size - (if (hasStage) 3 else 2)]
|
||||||
if (modifyExt in knownModifyExtensions && ext !in knownExtensions)
|
if (modifyExt in unsupportedModifyExtensions)
|
||||||
|
return@testIsKnownJpsTestProject Pair(false, "unsupported modification extension ${it.name}")
|
||||||
|
if (modifyExt in supportedModifyExtensions && ext !in supportedSourceExtensions)
|
||||||
return@testIsKnownJpsTestProject Pair(false, "unknown staged file ${it.name}")
|
return@testIsKnownJpsTestProject Pair(false, "unknown staged file ${it.name}")
|
||||||
}
|
}
|
||||||
if (!hasKnownSources && it.extension in knownExtensions) {
|
if (!hasKnownSources && it.extension in supportedSourceExtensions) {
|
||||||
hasKnownSources = true
|
hasKnownSources = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user