cleanup
[fedora-idea.git] / build / scripts / common_tests.gant
blobd48f1f059e9938034814a708a7e54b01ff75af6b
1 import static org.jetbrains.jps.idea.IdeaProjectLoader.*
3 includeTargets << new File("${guessHome(this)}/build/scripts/utils.gant")
5 requireProperty("out", "$home/out/classes")
7 target(compile: "Compile project") {
8   loadProject()
9   project["javac"] = "$jdk/bin/javac"
10   project.targetFolder = out
11   project.clean()
12   project.makeAll()
15 def pass(String prop) {
16   if (isDefined(prop)) {
17     ant.jvmarg(value: "-D$prop=${p(prop)}")
18   }
21 target('default': 'The default target') {
22   depends(compile)
24   ant.junit(fork: "yes", showoutput: "true") {
25     jvmarg (value: "-ea")
26     jvmarg (value: "-Didea.home.path=$home")
27     pass("idea.test.group")
28     pass("teamcity.tests.recentlyFailedTests.file")
29     jvmarg (value: "-Didea.platform.prefix=Idea")
30     jvmarg (value: "-Didea.home.path=$home")
31     jvmarg (value: "-Xbootclasspath/p:${boot.output}")
32     jvmarg (value: "-Djava.system.class.loader=com.intellij.util.lang.UrlClassLoader")
33     jvmarg (value: "-XX:+HeapDumpOnOutOfMemoryError")
34     jvmarg (value: "-Didea.system.path=${p("teamcity.build.tempDir")}/system")
35     jvmarg (value: "-Didea.config.path=${p("teamcity.build.tempDir")}/config")
36     jvmarg (value: "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005")
38     if (isDefined("jvm_args")) {
39       jvm_args.each { jvmarg(value: it) }
40     }
42     classpath {
43       this["community-main"].testRuntimeClasspath().each {
44         pathelement(location: it)
45       }
46       pathelement(location: "${jdk}/lib/tools.jar")
47     }
49     testcases.each {
50       test (name: it)
51     }
52   }