[PL][tests] K/JS: Avoid any unexpected warnings to appear in tests

This commit is contained in:
Dmitriy Dolovov
2023-07-12 11:45:16 +02:00
committed by Space Team
parent 715aba3d18
commit 938146749d
12 changed files with 71 additions and 58 deletions
@@ -26,8 +26,8 @@ object PartialLinkageTestUtils {
// Build a KLIB from a module.
fun buildKlib(moduleName: String, buildDirs: ModuleBuildDirs, dependencies: Dependencies, klibFile: File)
// Build a binary (executable) file given the main KLIB and dependencies.
fun buildBinaryAndRun(mainModuleKlibFile: File, dependencies: Dependencies)
// Build a binary (executable) file given the main KLIB and the rest of dependencies.
fun buildBinaryAndRun(mainModule: Dependency, otherDependencies: Dependencies)
// Take measures if the build directory is non-empty before the compilation
// (ex: backup the previously generated artifacts stored in the build directory).
@@ -163,9 +163,8 @@ object PartialLinkageTestUtils {
val mainModuleKlibFile = modulesMap[MAIN_MODULE_NAME]?.klibFile ?: fail { "No main module $MAIN_MODULE_NAME found" }
val mainModuleDependency = Dependency(MAIN_MODULE_NAME, mainModuleKlibFile)
binaryDependencies = binaryDependencies.mergeWith(Dependencies(setOf(mainModuleDependency), emptySet()))
buildBinaryAndRun(mainModuleKlibFile, binaryDependencies)
buildBinaryAndRun(mainModuleDependency, binaryDependencies)
}
private fun copySources(from: File, to: File, patchSourceFile: ((String) -> String)? = null) {