Test caches for linux_x64 on Linux host.
This commit is contained in:
+19
-12
@@ -137,24 +137,31 @@ class NativePlatformLibsIT : BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testRerunGeneratorIfCacheKindChanged() {
|
fun testRerunGeneratorIfCacheKindChanged() {
|
||||||
// Currently we can generate caches only for macos_x64 and ios_x64.
|
// There are no cacheable targets on MinGW for now.
|
||||||
Assume.assumeTrue(HostManager.hostIsMac)
|
Assume.assumeFalse(HostManager.hostIsMingw)
|
||||||
|
|
||||||
deleteInstalledCompilers()
|
deleteInstalledCompilers()
|
||||||
|
|
||||||
with(platformLibrariesProject("iosX64")) {
|
fun buildPlatformLibrariesWithoutAndWithCaches(target: KonanTarget) {
|
||||||
// Build Mac libraries without caches.
|
with(platformLibrariesProject(target.presetName)) {
|
||||||
buildWithLightDist("tasks") {
|
val targetName = target.name
|
||||||
assertSuccessful()
|
// Build libraries without caches.
|
||||||
assertContains("Generate platform libraries for ios_x64")
|
buildWithLightDist("tasks") {
|
||||||
}
|
assertSuccessful()
|
||||||
|
assertContains("Generate platform libraries for $targetName")
|
||||||
|
}
|
||||||
|
|
||||||
// Change cache kind and check that platform libraries generator was executed.
|
// Change cache kind and check that platform libraries generator was executed.
|
||||||
buildWithLightDist("tasks", "-Pkotlin.native.cacheKind.ios_x64=static") {
|
buildWithLightDist("tasks", "-Pkotlin.native.cacheKind.$targetName=static") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertContains("Precompile platform libraries for ios_x64 (precompilation: static)")
|
assertContains("Precompile platform libraries for $targetName (precompilation: static)")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
when {
|
||||||
|
HostManager.hostIsMac -> buildPlatformLibrariesWithoutAndWithCaches(KonanTarget.IOS_X64)
|
||||||
|
HostManager.hostIsLinux -> buildPlatformLibrariesWithoutAndWithCaches(KonanTarget.LINUX_X64)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user