File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
src/commonTest/kotlin/maryk/rocksdb/util Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 3
3
import org.gradle.kotlin.dsl.get
4
4
import org.gradle.kotlin.dsl.withType
5
5
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
6
+ import org.jetbrains.kotlin.gradle.plugin.mpp.TestExecutable
6
7
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
7
8
import java.util.*
8
9
@@ -219,6 +220,19 @@ tasks.withType<Test> {
219
220
}
220
221
}
221
222
223
+ kotlin.targets.withType<KotlinNativeTarget >().configureEach {
224
+ binaries.withType<TestExecutable >().all {
225
+ println (" Configuring test binary for ${this .target.name} " + linkTaskName)
226
+
227
+ tasks.findByName(" ${this .target.name} Test" )?.apply {
228
+ dependsOn(createOrEraseDBFolders)
229
+ doLast {
230
+ project.layout.buildDirectory.dir(" test-database" ).get().asFile.deleteRecursively()
231
+ }
232
+ }
233
+ }
234
+ }
235
+
222
236
// Placeholder secrets to allow project sync and build without publication setup
223
237
ext[" signing.keyId" ] = System .getenv(" SIGNING_KEY_ID" )
224
238
ext[" signing.password" ] = System .getenv(" SIGNING_PASSWORD" )
Original file line number Diff line number Diff line change 1
1
package maryk.rocksdb.util
2
2
3
- import maryk.createFolder
4
3
import kotlin.random.Random
5
4
import kotlin.random.nextUInt
6
5
7
6
@Suppress(" EXPERIMENTAL_API_USAGE" )
8
7
fun createTestDBFolder (name : String? ) =
9
- (" build/test-database/${name!! } _" + Random .nextUInt()). also { createFolder(it) }
8
+ (" build/test-database/${name!! } _" + Random .nextUInt())
You can’t perform that action at this time.
0 commit comments