timestamp added
[fedora-idea.git] / build / scripts / common_tests.gant
bloba5d7571a90e3367b0b45de315bb5400262aeb8b4
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: "-agentlib:yjpagent=disablej2ee,disablealloc,sessionname=MainTests")
37     jvmarg (value: "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005")
39     if (isDefined("jvm_args")) {
40       jvm_args.each { jvmarg(value: it) }
41     }
43     classpath {
44       this["community-main"].testRuntimeClasspath().each {
45         pathelement(location: it)
46       }
47       pathelement(location: "${jdk}/lib/tools.jar")
48     }
50     testcases.each {
51       test (name: it)
52     }
53   }