mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-05 12:45:00 +08:00
console IT: Do not delete entire test sandbox, keep libraries
This commit is contained in:
parent
97ce422b33
commit
556c805448
@ -9,7 +9,7 @@
|
||||
|
||||
@file:Suppress("UnusedImport")
|
||||
|
||||
import java.util.Base64
|
||||
import java.util.*
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@ -56,6 +56,13 @@ dependencies {
|
||||
|
||||
}
|
||||
|
||||
// requires manual run
|
||||
val deleteSandbox = tasks.register("deleteSandbox", Delete::class.java) {
|
||||
group = "mirai"
|
||||
delete("build/IntegrationTest")
|
||||
}
|
||||
//tasks.getByName("clean").dependsOn(deleteSandbox)
|
||||
|
||||
val subplugins = mutableListOf<TaskProvider<Jar>>()
|
||||
|
||||
val mcit_test = tasks.named<Test>("test")
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
@ -53,7 +53,8 @@ public class MiraiConsoleIntegrationTestLauncher {
|
||||
public var plugins: MutableCollection<String> = mutableListOf()
|
||||
|
||||
public fun launch() {
|
||||
workingDir.deleteRecursively()
|
||||
workingDir.listFiles()?.filterNot { it.name.contains("libraries") }
|
||||
?.forEach { it.deleteRecursively() } // do not download repeatedly
|
||||
workingDir.mkdirs()
|
||||
val isDebugging = vmoptions.any { it.startsWith("-agentlib:") }
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
||||
* Copyright 2019-2022 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
@ -21,7 +21,6 @@ import kotlin.io.path.inputStream
|
||||
import kotlin.io.path.isDirectory
|
||||
import kotlin.io.path.name
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.streams.toList
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
|
||||
@ -33,6 +32,7 @@ class MiraiConsoleIntegrationTestBootstrap {
|
||||
不使用 @TempDir 是为了保存最后一次失败快照, 便于 debug
|
||||
*/
|
||||
val workingDir = File("build/IntegrationTest") // mirai-console/backend/integration-test/build/IntegrationTest
|
||||
// 注意: 如果更改 workingDir, 还要更改 mirai-console/backend/integration-test/build.gradle.kts:60 (clean task 的依赖)
|
||||
val launcher = MiraiConsoleIntegrationTestLauncher()
|
||||
launcher.workingDir = workingDir
|
||||
launcher.plugins = readStringListFromEnv("IT_PLUGINS")
|
||||
|
Loading…
Reference in New Issue
Block a user