Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBinary
import org.jetbrains.kotlin.gradle.plugin.mpp.TestExecutable
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeHostTest

repositories {
google()
Expand Down Expand Up @@ -88,6 +89,7 @@ object RocksdbArtifacts {
)
}


@CacheableTask
abstract class DownloadRocksdbTask : DefaultTask() {
@get:Input
Expand Down Expand Up @@ -500,10 +502,17 @@ kotlin {
targets.withType<KotlinNativeTarget>().configureEach {
configureRocksdbPrebuilt(rocksdbPrebuiltVersionValue, rocksdbPrebuiltBaseUrlValue)
}

}


// Ensure Windows-specific ignored tests are skipped on any mingw environment (no Wine)
tasks.withType(KotlinNativeHostTest::class).configureEach {
if (name.startsWith("mingw", ignoreCase = true)) {
val existing = args.toList()
doFirst {
this@configureEach.args = existing + listOf("--ktest_negative_gradle_filter=maryk.rocksdb.*")
}
}
}

tasks.register("updateRocksdbShas") {
group = "rocksdb"
Expand Down
34 changes: 17 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ kotlin.mpp.stability.nowarn=true
kotlin.mpp.androidSourceSetLayoutVersion=2

rocksdbPrebuiltBaseUrl=https://github.com/marykdb/build-rocksdb/releases/download
rocksdbPrebuiltVersion=rocksdb-10.4.2-20251001T194105Z
rocksdbPrebuiltSha.androidNativeArm32=ebefefa861fb4c7fb80390b3ebd8e0fc354a2a72366f301c8ab104631b1c99f2
rocksdbPrebuiltSha.androidNativeArm64=c4bcef8199b3dd0da21c9e1a59b0d94a2fa21ac0e34fe7c601d0b4450b628f2c
rocksdbPrebuiltSha.androidNativeX64=0c0a1dea0a1d469c12e00c27ddc484e4c5216b0fb23ff176e30ec6148c62d650
rocksdbPrebuiltSha.androidNativeX86=d27cffa4fcb48e20de9b19ce5ce49cf71addd32eb41bdf74bacb6c586d193ee5
rocksdbPrebuiltSha.iosArm64=c546423b2b30abd6765ec78f1bb9718a7f49715c3412f82cfe7a8b41b426dc2a
rocksdbPrebuiltSha.iosSimulatorArm64=5d8485604b8bbbf1e5823cede712ddb08498730b4fbdce8d70d9a551e2cc9d93
rocksdbPrebuiltSha.linuxArm64=8f3e0dc08e6a391645331590aad6787b8f4fc322eb05af4bd7cd3ab122ce955a
rocksdbPrebuiltSha.linuxX64=a6fa6e382c4c22f29428e08aff4452e3ec3360d36bcd8cd306f8e395eab8e49d
rocksdbPrebuiltSha.macosArm64=107b53a53d8d21efb0a51b45e4638f36fdc627142c8825d4b3bc846e322269b2
rocksdbPrebuiltSha.macosX64=d73be644d65d0fc7ed143d6e6a8a0de7327dd5cab5f2553e2866a653b956ab5a
rocksdbPrebuiltSha.mingwX64=c25dca0fcf489f62512da7771c0a9b9a64cb805baffc61cc1fc3ee0d991476fb
rocksdbPrebuiltSha.tvosArm64=77f28a797ad2640f6376baf3535cb5022ccbba0593e91beb7756b6d72a539202
rocksdbPrebuiltSha.tvosSimulatorArm64=9a40b7f1c33d82c678cc799b3a8b7ef1e41108ee8d01d814d8d9d13c15791e41
rocksdbPrebuiltSha.watchosArm64=42c6d11f7b6cb4ecb032d948b3d5c50c01c31aa694222f3b6f99a518ddbf90a0
rocksdbPrebuiltSha.watchosDeviceArm64=953c0d4010224dbd06d443f1883ae870c5a9fc066f7603c16b51eea527308c92
rocksdbPrebuiltSha.watchosSimulatorArm64=40f9549c965d2d71fc90668e418466460b5bf985f1a0b16f6c790bd7e230fcbc
rocksdbPrebuiltVersion=rocksdb-10.4.2-20251003T081206Z
rocksdbPrebuiltSha.androidNativeArm32=aef4756e72a85afc75ddb5b9f5e70612c6e9984c3b6515bd4aa685481099a458
rocksdbPrebuiltSha.androidNativeArm64=3375125b540018bfa84350393586af34c0c379694e1b7eede5c0bff1b166fd79
rocksdbPrebuiltSha.androidNativeX64=4b56388ea8ec2c48a56149804c1c01c776a4dd6bfd4991d38c9a844b15f475f8
rocksdbPrebuiltSha.androidNativeX86=b8e8bf3d57478524d60bb8eaee24fe32e2032400281d58ef3d3cd1639eeff61e
rocksdbPrebuiltSha.iosArm64=757ef148940474dc4009ff525f6e298a94d86ed3aef36c10a7c8e6a18c1109c1
rocksdbPrebuiltSha.iosSimulatorArm64=04127eb98406aa26d82902c6f49e47494cd0942ff54c57f101abd32205aee7b3
rocksdbPrebuiltSha.linuxArm64=750259e3dc7fe9041601f716986f7998b6c2bf6cbd0a09183bf67b114085b181
rocksdbPrebuiltSha.linuxX64=7be047b56eaeacc467f9f30defe592d23537fe3e131c236f8eb071d07b220c50
rocksdbPrebuiltSha.macosArm64=486a29c4cab0d5a96b86d2363ee64c5052a2b84946730bfd58d8227a80592888
rocksdbPrebuiltSha.macosX64=5db5e765635e7a76effde197d9d3d0aa44ebeb4cfe5ca147dfa1893aebb88644
rocksdbPrebuiltSha.mingwX64=c2b92d01d5725f50cbe2e3dbcdebe831152217f3579e02ea275e7c53463b85b1
rocksdbPrebuiltSha.tvosArm64=bd12105ff0e75059f4fd92b4df2137c34c199732dbf3b82cfcebe636da62bba4
rocksdbPrebuiltSha.tvosSimulatorArm64=eb35fe3eca677713148de53417922d40cdfb5814c9f8936dea123ee96bae53ef
rocksdbPrebuiltSha.watchosArm64=41147bd29420d70902850891a799cbc7eef31088a0f867a495f04b1f0f04a346
rocksdbPrebuiltSha.watchosDeviceArm64=5888de27a00dd378a6be7caff7c4dbed717ab08e3c5d3533de253e0bdce231f3
rocksdbPrebuiltSha.watchosSimulatorArm64=fb462d17af3d69a95f49d6eb6a6627272566fb7edf29f303b1ef6f4775b490db
3 changes: 3 additions & 0 deletions src/androidNativeTest/kotlin/maryk/WindowsIgnore.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package maryk

actual annotation class WindowsIgnore actual constructor(actual val reason: String = "")
3 changes: 3 additions & 0 deletions src/appleTest/kotlin/maryk/WindowsIgnore.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package maryk

actual annotation class WindowsIgnore actual constructor(actual val reason: String = "")
9 changes: 9 additions & 0 deletions src/commonTest/kotlin/maryk/WindowsIgnore.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package maryk

import kotlin.annotation.AnnotationRetention.RUNTIME
import kotlin.annotation.AnnotationTarget.CLASS
import kotlin.annotation.AnnotationTarget.FUNCTION

@Target(CLASS, FUNCTION)
@Retention(RUNTIME)
expect annotation class WindowsIgnore(val reason: String = "")
6 changes: 6 additions & 0 deletions src/commonTest/kotlin/maryk/rocksdb/BackupEngineTest.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package maryk.rocksdb

import maryk.WindowsIgnore
import maryk.createFolder
import maryk.rocksdb.util.createTestDBFolder
import kotlin.random.Random
Expand All @@ -16,6 +17,7 @@ class BackupEngineTest {
return folder
}

@WindowsIgnore("RocksDB backup engine crashes under Wine")
@Test
fun backupDb() {
// Open empty database.
Expand All @@ -41,6 +43,7 @@ class BackupEngineTest {
}
}

@WindowsIgnore("RocksDB backup engine crashes under Wine")
@Test
fun deleteBackup() {
// Open empty database.
Expand Down Expand Up @@ -71,6 +74,7 @@ class BackupEngineTest {
}
}

@WindowsIgnore("RocksDB backup engine crashes under Wine")
@Test
fun purgeOldBackups() {
// Open empty database.
Expand Down Expand Up @@ -102,6 +106,7 @@ class BackupEngineTest {
}
}

@WindowsIgnore("RocksDB backup engine crashes under Wine")
@Test
fun restoreLatestBackup() {
Options().setCreateIfMissing(true).use { opt ->
Expand Down Expand Up @@ -159,6 +164,7 @@ class BackupEngineTest {
}
}

@WindowsIgnore("RocksDB backup engine crashes under Wine")
@Test
fun restoreFromBackup() {
Options().setCreateIfMissing(true).use { opt ->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package maryk.rocksdb

import maryk.WindowsIgnore
import maryk.createFolder
import kotlin.test.Test
import kotlin.test.assertEquals
Expand All @@ -13,6 +14,7 @@ class BackupableDBOptionsTest {
loadRocksDBLibrary()
}

@WindowsIgnore("RocksDB backup engine options crash under Wine")
@Test
fun backupDir() {
BackupEngineOptions(arbitraryPath).use { backupableDBOptions ->
Expand Down
4 changes: 4 additions & 0 deletions src/commonTest/kotlin/maryk/rocksdb/CheckpointTest.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package maryk.rocksdb

import maryk.WindowsIgnore
import maryk.createFolder
import maryk.deleteFolder
import maryk.rocksdb.util.createTestDBFolder
Expand All @@ -25,6 +26,7 @@ class CheckPointTest {
deleteFolder(checkpointFolder)
}

@WindowsIgnore("RocksDB checkpoint support crashes under Wine")
@Test
fun checkPoint() {
Options().setCreateIfMissing(true).use { options ->
Expand Down Expand Up @@ -58,6 +60,7 @@ class CheckPointTest {
}
}

@WindowsIgnore("RocksDB checkpoint support crashes under Wine")
@Test
fun failIfDbNotInitialized() {
openRocksDB(
Expand All @@ -70,6 +73,7 @@ class CheckPointTest {
}
}

@WindowsIgnore("RocksDB checkpoint support crashes under Wine")
@Test
fun failWithIllegalPath() {
openRocksDB(createTestFolder()).use { db ->
Expand Down
3 changes: 3 additions & 0 deletions src/jvmTest/kotlin/maryk/WindowsIgnore.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package maryk

actual annotation class WindowsIgnore actual constructor(actual val reason: String = "")
3 changes: 3 additions & 0 deletions src/linuxTest/kotlin/maryk/WindowsIgnore.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package maryk

actual annotation class WindowsIgnore actual constructor(actual val reason: String = "")
11 changes: 11 additions & 0 deletions src/mingwTest/kotlin/maryk/WindowsIgnore.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package maryk

import kotlin.annotation.AnnotationRetention.RUNTIME
import kotlin.annotation.AnnotationTarget.CLASS
import kotlin.annotation.AnnotationTarget.FUNCTION
import kotlin.test.Ignore

@Target(CLASS, FUNCTION)
@Retention(RUNTIME)
@Ignore
actual annotation class WindowsIgnore actual constructor(actual val reason: String = "")