mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
Make it possible to run DiagnosisCompilerTestDataSpecTestGenerated from fir-low-level-api in IJ infra
This commit is contained in:
committed by
teamcityserver
parent
294ec3905b
commit
3aebd0315f
@@ -19,14 +19,15 @@ import org.jetbrains.kotlin.test.runners.AbstractFirDiagnosticTestSpec
|
||||
import java.io.File
|
||||
import java.nio.file.Files
|
||||
|
||||
fun detectDirsWithTestsMapFileOnly(dirName: String): List<String> {
|
||||
// `baseDir` is used in Kotlin plugin from IJ infra
|
||||
fun detectDirsWithTestsMapFileOnly(dirName: String, baseDir: String = "."): List<String> {
|
||||
val excludedDirs = mutableListOf<String>()
|
||||
|
||||
File("$SPEC_TESTDATA_PATH/$dirName").walkTopDown().forEach { file ->
|
||||
File("${baseDir}/$SPEC_TESTDATA_PATH/$dirName").walkTopDown().forEach { file ->
|
||||
val listFiles = Files.walk(file.toPath()).filter(Files::isRegularFile)
|
||||
|
||||
if (file.isDirectory && listFiles?.allMatch { it.endsWith(TESTS_MAP_FILENAME) } == true) {
|
||||
val relativePath = file.relativeTo(File("$SPEC_TESTDATA_PATH/$dirName")).path
|
||||
val relativePath = file.relativeTo(File("${baseDir}/$SPEC_TESTDATA_PATH/$dirName")).path
|
||||
|
||||
if (!excludedDirs.any { relativePath.startsWith(it) }) {
|
||||
excludedDirs.add(relativePath)
|
||||
|
||||
@@ -17,6 +17,7 @@ idePluginDependency {
|
||||
"compiler/fir/analysis-tests/testData/resolveWithStdlib",
|
||||
"compiler/testData/diagnostics/tests",
|
||||
"compiler/testData/diagnostics/helpers",
|
||||
"compiler/tests-spec/testData",
|
||||
"compiler/testData/diagnostics/testsWithStdLib"
|
||||
).forEach {
|
||||
from(rootDir.resolve(it)) {
|
||||
|
||||
@@ -7,6 +7,7 @@ publishTestJarsForIde(
|
||||
":compiler:test-infrastructure",
|
||||
":compiler:tests-common-new",
|
||||
":compiler:test-infrastructure-utils",
|
||||
":compiler:tests-compiler-utils"
|
||||
":compiler:tests-compiler-utils",
|
||||
":compiler:tests-spec"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user