[JS IR test] Use relative paths for klib building in invalidation tests
This commit is contained in:
committed by
Space Team
parent
27b458c222
commit
bf80d55fc3
@@ -156,6 +156,20 @@ abstract class AbstractInvalidationTest(
|
|||||||
return copy
|
return copy
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun CompilerConfiguration.enableKlibRelativePaths(moduleSourceDir: File) {
|
||||||
|
val bases = mutableListOf<String>()
|
||||||
|
val platformDirs = moduleSourceDir.listFiles() ?: arrayOf()
|
||||||
|
for (platformDir in platformDirs) {
|
||||||
|
if (platformDir.isDirectory) {
|
||||||
|
bases.add(platformDir.absolutePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bases.isEmpty()) {
|
||||||
|
bases.add(moduleSourceDir.absolutePath)
|
||||||
|
}
|
||||||
|
put(CommonConfigurationKeys.KLIB_RELATIVE_PATH_BASES, bases)
|
||||||
|
}
|
||||||
|
|
||||||
private inner class ProjectStepsExecutor(
|
private inner class ProjectStepsExecutor(
|
||||||
private val projectInfo: ProjectInfo,
|
private val projectInfo: ProjectInfo,
|
||||||
private val moduleInfos: Map<String, ModuleInfo>,
|
private val moduleInfos: Map<String, ModuleInfo>,
|
||||||
@@ -197,6 +211,7 @@ abstract class AbstractInvalidationTest(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
val configuration = createConfiguration(module, projStep.language, projectInfo.moduleKind)
|
val configuration = createConfiguration(module, projStep.language, projectInfo.moduleKind)
|
||||||
|
configuration.enableKlibRelativePaths(moduleSourceDir)
|
||||||
outputKlibFile.delete()
|
outputKlibFile.delete()
|
||||||
buildKlib(configuration, module, moduleSourceDir, dependencies, friends, outputKlibFile)
|
buildKlib(configuration, module, moduleSourceDir, dependencies, friends, outputKlibFile)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user