[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.
This commit is contained in:
committed by
Space Team
parent
72f9cdf49b
commit
74c39df0d8
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user