[PL][tests] Adapt tests for K/N to the conditions when static cache is used w/o lazy IR

This commit is contained in:
Dmitriy Dolovov
2023-06-19 14:10:09 +02:00
committed by Space Team
parent 5f3dad14a2
commit 2e43fa7cd0
9 changed files with 53 additions and 34 deletions
@@ -34,14 +34,20 @@ abstract class AbstractNativePartialLinkageTest : AbstractNativeSimpleTest() {
override val buildDir get() = this@AbstractNativePartialLinkageTest.buildDir
override val stdlibFile get() = this@AbstractNativePartialLinkageTest.stdlibFile
override val testModeName = with(testRunSettings.get<CacheMode>()) {
val cacheModeAlias = when {
!useStaticCacheForDistributionLibraries -> CacheMode.Alias.NO
!useStaticCacheForUserLibraries -> CacheMode.Alias.STATIC_ONLY_DIST
else -> CacheMode.Alias.STATIC_EVERYWHERE
}
override val testModeConstructorParameters = buildMap {
this["isNative"] = "true"
"NATIVE_CACHE_${cacheModeAlias}"
val cacheMode = testRunSettings.get<CacheMode>()
when {
cacheMode.useStaticCacheForUserLibraries -> {
this["staticCache"] = "TestMode.Scope.EVERYWHERE"
this["lazyIr"] = "TestMode.Scope.NOWHERE" // by default LazyIR is disabled
}
cacheMode.useStaticCacheForDistributionLibraries -> {
this["staticCache"] = "TestMode.Scope.DISTRIBUTION"
this["lazyIr"] = "TestMode.Scope.NOWHERE" // by default LazyIR is disabled
}
}
}
override fun customizeModuleSources(moduleName: String, moduleSourceDir: File) {