From 74c39df0d885f5ce2b5c3ecb6eecf0c347d5f0ac Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Wed, 15 Feb 2023 16:11:58 +0100 Subject: [PATCH] [K/N][tests] Allow running :native:native.tests:test on TeamCity With this task, we can be more sure that TeamCity runs all the tests. Other test tasks in :native:native.tests project run only tests with specific pre-defined tags, so running them on TeamCity was discovered to be more error-prone in that regard, and is generally less flexible. --- native/native.tests/build.gradle.kts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/native/native.tests/build.gradle.kts b/native/native.tests/build.gradle.kts index 2fd0d073454..ce536d48063 100644 --- a/native/native.tests/build.gradle.kts +++ b/native/native.tests/build.gradle.kts @@ -55,13 +55,7 @@ val cachesTest = nativeTest("cachesTest", "caches") val k1libContentsTest = nativeTest("k1libContentsTest", "k1libContents") val k2libContentsTest = nativeTest("k2libContentsTest", "k2libContents") -// "test" task is created by convention. We can't just remove it. Let's enable it in developer's environment, so it can be used -// to run any test from IDE or from console, but disable it at TeamCity where it is not supposed to be ever used. -val test by nativeTest("test", null /* no tags */).apply { - if (kotlinBuildProperties.isTeamcityBuild) { - configure { doFirst { throw GradleException("Task $path is not supposed to be executed in TeamCity environment") } } - } -} +val test by nativeTest("test", null /* no tags */) val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateNativeTestsKt") { javaLauncher.set(project.getToolchainLauncherFor(JdkMajorVersion.JDK_11_0))