[fir][test] ignore native tree
This commit is contained in:
committed by
Stanislav Erokhin
parent
f77ba914c7
commit
d2c9116b51
+3
-1
@@ -11,7 +11,9 @@ fun String.walkTopDown(f: (File) -> Unit) {
|
|||||||
val root = File(this)
|
val root = File(this)
|
||||||
for (file in root.walkTopDown()) {
|
for (file in root.walkTopDown()) {
|
||||||
if (file.isDirectory) continue
|
if (file.isDirectory) continue
|
||||||
if (file.path.contains("testData") || file.path.contains("resources")) continue
|
if (file.path.contains("kotlin-native") ||
|
||||||
|
file.path.contains("testData") ||
|
||||||
|
file.path.contains("resources")) continue
|
||||||
if (file.extension != "kt") continue
|
if (file.extension != "kt") continue
|
||||||
|
|
||||||
f(file)
|
f(file)
|
||||||
|
|||||||
+10
-2
@@ -80,12 +80,20 @@ class TotalKotlinTest : AbstractRawFirBuilderTestCase() {
|
|||||||
println("BASE PATH: $path")
|
println("BASE PATH: $path")
|
||||||
for (file in root.walkTopDown()) {
|
for (file in root.walkTopDown()) {
|
||||||
if (file.isDirectory) continue
|
if (file.isDirectory) continue
|
||||||
if (file.path.toLowerCase().contains("testdata") || file.path.contains("resources")) continue
|
/* TODO: fix this, please !!! */
|
||||||
|
if (file.path.contains("kotlin-native") ||
|
||||||
|
file.path.toLowerCase().contains("testdata") ||
|
||||||
|
file.path.contains("resources")
|
||||||
|
) continue
|
||||||
if (file.extension != "kt") continue
|
if (file.extension != "kt") continue
|
||||||
|
|
||||||
val text = FileUtil.loadFile(file, CharsetToolkit.UTF8, true).trim()
|
val text = FileUtil.loadFile(file, CharsetToolkit.UTF8, true).trim()
|
||||||
time += measureNanoTime {
|
time += measureNanoTime {
|
||||||
generateFirFromPsi(onlyPsi, text, file.path)
|
try {
|
||||||
|
generateFirFromPsi(onlyPsi, text, file.path)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
throw IllegalStateException(file.path, e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
counter++
|
counter++
|
||||||
|
|||||||
+14
-3
@@ -53,7 +53,11 @@ class RawFirBuilderTotalKotlinTestCase : AbstractRawFirBuilderTestCase() {
|
|||||||
for (file in root.walkTopDown()) {
|
for (file in root.walkTopDown()) {
|
||||||
if (file.isDirectory) continue
|
if (file.isDirectory) continue
|
||||||
val path = file.path.toLowerCase()
|
val path = file.path.toLowerCase()
|
||||||
if ("testdata" in path || "resources" in path || "api/js" in path.replace('\\', '/')) continue
|
if ("testdata" in path ||
|
||||||
|
"kotlin-native" in path ||
|
||||||
|
"resources" in path ||
|
||||||
|
"api/js" in path.replace('\\', '/')
|
||||||
|
) continue
|
||||||
if (file.extension != "kt") continue
|
if (file.extension != "kt") continue
|
||||||
try {
|
try {
|
||||||
val ktFile = createKtFile(file.toRelativeString(root))
|
val ktFile = createKtFile(file.toRelativeString(root))
|
||||||
@@ -177,7 +181,11 @@ class RawFirBuilderTotalKotlinTestCase : AbstractRawFirBuilderTestCase() {
|
|||||||
for (file in root.walkTopDown()) {
|
for (file in root.walkTopDown()) {
|
||||||
if (file.isDirectory) continue
|
if (file.isDirectory) continue
|
||||||
val path = file.path.toLowerCase()
|
val path = file.path.toLowerCase()
|
||||||
if ("testdata" in path || "resources" in path || "api/js" in path.replace('\\', '/')) continue
|
if ("kotlin-native" in path ||
|
||||||
|
"testdata" in path ||
|
||||||
|
"resources" in path ||
|
||||||
|
"api/js" in path.replace('\\', '/')
|
||||||
|
) continue
|
||||||
if (file.extension != "kt") continue
|
if (file.extension != "kt") continue
|
||||||
val ktFile = createKtFile(file.toRelativeString(root))
|
val ktFile = createKtFile(file.toRelativeString(root))
|
||||||
val firFile = ktFile.toFirFile()
|
val firFile = ktFile.toFirFile()
|
||||||
@@ -204,7 +212,10 @@ class RawFirBuilderTotalKotlinTestCase : AbstractRawFirBuilderTestCase() {
|
|||||||
for (file in root.walkTopDown()) {
|
for (file in root.walkTopDown()) {
|
||||||
if (file.isDirectory) continue
|
if (file.isDirectory) continue
|
||||||
val path = file.path.toLowerCase()
|
val path = file.path.toLowerCase()
|
||||||
if ("testdata" in path || "resources" in path || "api/js" in path.replace('\\', '/')) continue
|
if ("kotlin-native" in path ||
|
||||||
|
"testdata" in path ||
|
||||||
|
"resources" in path ||
|
||||||
|
"api/js" in path.replace('\\', '/')) continue
|
||||||
if (file.extension != "kt") continue
|
if (file.extension != "kt") continue
|
||||||
val ktFile = createKtFile(file.toRelativeString(root))
|
val ktFile = createKtFile(file.toRelativeString(root))
|
||||||
val firFile: FirFile = ktFile.toFirFile()
|
val firFile: FirFile = ktFile.toFirFile()
|
||||||
|
|||||||
Reference in New Issue
Block a user