mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
(cherry picked from commit 8a21d9da253a77b6d661e6a2eeb677f60c880126) IJ-CR-16014 GitOrigin-RevId: 229526a3c4ff6a4f1d07d6e5816412179b3c8dba
41 lines
1.2 KiB
Groovy
41 lines
1.2 KiB
Groovy
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
plugins {
|
|
id "groovy"
|
|
id "com.jetbrains.python.envs" version "0.0.31"
|
|
}
|
|
|
|
File pythonDirectory = new File(buildDir, 'pythons')
|
|
boolean isWindows = Os.isFamily(Os.FAMILY_WINDOWS)
|
|
String pythonExecutable = isWindows ? "python.exe" : "bin/python"
|
|
|
|
envs {
|
|
bootstrapDirectory = pythonDirectory
|
|
|
|
if (System.getenv().containsKey("PYCHARM_ZIP_REPOSITORY")) {
|
|
zipRepository = new URL(System.getenv().get("PYCHARM_ZIP_REPOSITORY"))
|
|
shouldUseZipsFromRepository = isWindows
|
|
}
|
|
|
|
Closure testHelpers = { String pythonName, String pythonVersion ->
|
|
python pythonName, pythonVersion, ["teamcity-messages"]
|
|
|
|
String python = pythonDirectory.absolutePath + File.separator + pythonName + File.separator + pythonExecutable
|
|
|
|
task ("Tests for Python " + pythonVersion, type: Exec){
|
|
mustRunAfter 'build_envs'
|
|
|
|
environment PYTHONPATH: ".:.."
|
|
commandLine python, '__main__.py'
|
|
}
|
|
}
|
|
|
|
testHelpers("py27_64", "2.7.18")
|
|
testHelpers("py36_64", "3.6.8")
|
|
testHelpers("py37_64", "3.7.9")
|
|
testHelpers("py38_64", "3.8.10")
|
|
}
|
|
|
|
task ("all_tests") {
|
|
dependsOn 'build_envs', tasks.findAll { it.name.startsWith("Tests for Python") }
|
|
} |