Setup system property for NI tests with parameter -PnewInferenceTests

This commit is contained in:
Mikhail Zarechenskiy
2017-10-26 03:52:37 +03:00
parent 0410287cf9
commit b6542caf47
+17
View File
@@ -1,3 +1,19 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("unused") // usages in build scripts are not tracked properly
import org.gradle.api.Project
@@ -57,6 +73,7 @@ fun Project.projectTest(taskName: String = "test", body: Test.() -> Unit = {}):
environment("PROJECT_CLASSES_DIRS", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.asPath)
environment("PROJECT_BUILD_DIR", buildDir)
systemProperty("jps.kotlin.home", rootProject.extra["distKotlinHomeDir"])
systemProperty("kotlin.ni", if (rootProject.hasProperty("newInferenceTests")) "true" else "false")
body()
}