Skip to content

Commit

Permalink
introduce lightTree subfolder to exclude tests for PSI parser
Browse files Browse the repository at this point in the history
It will temporarily exclude tests because of KT-29222
  • Loading branch information
TomatorCZ authored and Space Team committed Dec 9, 2024
1 parent f02141e commit cf6413e
Show file tree
Hide file tree
Showing 8 changed files with 1,495 additions and 1,480 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ fun generateJUnit5CompilerTests(args: Array<String>, mainClassName: String?) {
}

testClass<AbstractFirPsiBlackBoxCodegenTest> {
model("codegen/box", excludeDirs = k1BoxTestDir)
model("codegen/box", excludeDirs = k1BoxTestDir, excludeDirsRecursively = listOf("lightTree"))
}

testClass<AbstractFirLightTreeBlackBoxCodegenTest>("FirLightTreeBlackBoxModernJdkCodegenTestGenerated") {
Expand Down Expand Up @@ -423,15 +423,20 @@ fun generateJUnit5CompilerTests(args: Array<String>, mainClassName: String?) {
true -> TestGeneratorUtil.KT_OR_KTS_WITHOUT_DOTS_IN_NAME
false -> TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME
}
val excludeLightTreeForPsi =
if (baseTestClassName == AbstractFirPsiDiagnosticTest::class.java.name) listOf("lightTree") else emptyList()

model(
"resolve",
pattern = pattern,
excludeDirsRecursively = excludeLightTreeForPsi,
skipSpecificFile = skipSpecificFileForFirDiagnosticTest(onlyTypealiases),
skipTestAllFilesCheck = onlyTypealiases
)
model(
"resolveWithStdlib",
pattern = pattern,
excludeDirsRecursively = excludeLightTreeForPsi,
skipSpecificFile = skipSpecificFileForFirDiagnosticTest(onlyTypealiases),
skipTestAllFilesCheck = onlyTypealiases
)
Expand All @@ -441,6 +446,7 @@ fun generateJUnit5CompilerTests(args: Array<String>, mainClassName: String?) {
model(
"resolveFreezesIDE",
pattern = """^(.+)\.(nkt)$""",
excludeDirsRecursively = excludeLightTreeForPsi,
skipSpecificFile = skipSpecificFileForFirDiagnosticTest(onlyTypealiases),
skipTestAllFilesCheck = onlyTypealiases
)
Expand Down Expand Up @@ -508,7 +514,11 @@ fun generateJUnit5CompilerTests(args: Array<String>, mainClassName: String?) {
)

testClass<AbstractTieredBackendJvmPsiTest>(
init = configureTierModelsForK1AlongsideDiagnosticTestsStating(TestTierLabel.BACKEND, allowKts = true),
init = configureTierModelsForK1AlongsideDiagnosticTestsStating(
TestTierLabel.BACKEND,
allowKts = true,
excludeDirsRecursively = listOf("lightTree")
),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ fun configureTierModelsForDeclaredAs(
vararg tiers: TestTierLabel,
relativeRootPaths: List<String>,
excludeDirs: List<String>,
excludeDirsRecursively: List<String> = emptyList(),
extension: String? = "kt",
pattern: String = if (extension == null) """^([^\.]+)$""" else "^(.+)\\.$extension\$",
excludedPattern: String? = null,
Expand All @@ -52,6 +53,7 @@ fun configureTierModelsForDeclaredAs(
extension = extension,
pattern = pattern,
excludedPattern = excludedPattern,
excludeDirsRecursively = excludeDirsRecursively,
)
}
}
Expand All @@ -62,6 +64,7 @@ fun configureTierModelsForDeclaredAs(
fun configureTierModelsForK1AlongsideDiagnosticTestsStating(
vararg tiers: TestTierLabel,
allowKts: Boolean,
excludeDirsRecursively: List<String> = emptyList(),
): TestGroup.TestClass.() -> Unit =
configureTierModelsForDeclaredAs(
*tiers,
Expand All @@ -80,4 +83,5 @@ fun configureTierModelsForK1AlongsideDiagnosticTestsStating(
else -> "^(.*)\\.(kt|nkt)$"
},
excludedPattern = CUSTOM_TEST_DATA_EXTENSION_PATTERN,
excludeDirsRecursively = excludeDirsRecursively,
)
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ internal fun TestGroupSuite.generateFirLowLevelApiTests() {
"compiler/fir/analysis-tests/testData",
) {
fun TestGroup.TestClass.modelInit() {
model("resolve", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME)
model("resolveWithStdlib", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME)
model("resolve", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME, excludeDirsRecursively = listOf("lightTree"))
model("resolveWithStdlib", pattern = TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME, excludeDirsRecursively = listOf("lightTree"))
}

testClass<AbstractDiagnosticCompilerTestDataTest>(suiteTestClassName = "DiagnosticCompilerTestFirTestdataTestGenerated") {
Expand Down Expand Up @@ -380,6 +380,7 @@ internal fun TestGroupSuite.generateFirLowLevelApiTests() {
"diagnostics/tests",
excludedPattern = CUSTOM_TEST_DATA_EXTENSION_PATTERN,
pattern = KT_OR_KTS,
excludeDirsRecursively = listOf("lightTree"),
)
model(
"diagnostics/testsWithStdLib",
Expand Down

0 comments on commit cf6413e

Please sign in to comment.