mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-01 15:51:52 +00:00
[FIR] Fix outputs for logs of modularized test
This commit is contained in:
@@ -43,13 +43,13 @@ private fun NodeList.toList(): List<Node> {
|
||||
|
||||
private val Node.childNodesList get() = childNodes.toList()
|
||||
|
||||
private val ROOT_PATH_PREFIX = System.getProperty("fir.bench.prefix", "/")
|
||||
val ROOT_PATH_PREFIX = System.getProperty("fir.bench.prefix", "/")
|
||||
|
||||
abstract class AbstractModularizedTest : KtUsefulTestCase() {
|
||||
private val folderDateFormat = SimpleDateFormat("yyyy-MM-dd")
|
||||
private lateinit var startDate: Date
|
||||
|
||||
protected fun reportDir() = File(FIR_LOGS_PATH, folderDateFormat.format(startDate))
|
||||
protected fun reportDir() = File(ROOT_PATH_PREFIX).resolve(FIR_LOGS_PATH).resolve(folderDateFormat.format(startDate))
|
||||
.also {
|
||||
it.mkdirs()
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ class FirResolveModularizedTotalKotlinTest : AbstractModularizedTest() {
|
||||
|
||||
private fun dumpFir(disambiguatedName: String, moduleData: ModuleData, firFiles: List<FirFile>) {
|
||||
if (!DUMP_FIR) return
|
||||
val dumpRoot = File(FIR_DUMP_PATH).resolve(disambiguatedName)
|
||||
val dumpRoot = File(ROOT_PATH_PREFIX, FIR_DUMP_PATH).resolve(disambiguatedName)
|
||||
firFiles.forEach {
|
||||
val directory = it.packageFqName.pathSegments().fold(dumpRoot) { file, name -> file.resolve(name.asString()) }
|
||||
directory.mkdirs()
|
||||
@@ -121,7 +121,7 @@ class FirResolveModularizedTotalKotlinTest : AbstractModularizedTest() {
|
||||
}
|
||||
|
||||
override fun beforePass() {
|
||||
if (DUMP_FIR) dump = MultiModuleHtmlFirDump(File(FIR_HTML_DUMP_PATH))
|
||||
if (DUMP_FIR) dump = MultiModuleHtmlFirDump(File(ROOT_PATH_PREFIX, FIR_HTML_DUMP_PATH))
|
||||
}
|
||||
|
||||
override fun afterPass(pass: Int) {
|
||||
|
||||
Reference in New Issue
Block a user