< prev index next >
./build.gradle
Print this page
rev 10442 : imported patch test-8177566-trampoline
*** 3240,3250 ****
--- 3240,3256 ----
sourceSets {
test
// Source sets for standalone test apps (used for launcher tests)
testapp1
+
+ // Modular applications
testapp2
+ testapp3
+ testapp4
+ testapp5
+ testapp6
}
project.ext.buildModule = false
project.ext.moduleRuntime = false
project.ext.moduleName = "systemTests"
*** 3326,3357 ****
includeEmptyDirs = false
from project.sourceSets.testapp1.output.classesDir
include("pkg2/**")
}
- def List<String> testApp2SourceDirs = []
- project.sourceSets.testapp2.java.srcDirs.each { dir ->
- testApp2SourceDirs += dir
- }
- compileTestapp2Java.options.compilerArgs.addAll([
- '-implicit:none',
- '--module-source-path', testApp2SourceDirs.join(File.pathSeparator)
- ] )
-
task createTestApps() {
dependsOn(createTestapp1Jar1)
dependsOn(createTestapp1Jar2)
- dependsOn(compileTestapp2Java)
}
test.dependsOn(createTestApps);
test {
enabled = IS_FULL_TEST
// Properties passed to launcher tests
! systemProperties 'launchertest.testapp1.jar': "build/testapp1/$testapp1JarName"
! systemProperties 'launchertest.testapp2.module.path': project.sourceSets.testapp2.output.classesDir
// Properties passed to test.util.Util
systemProperties 'worker.debug': IS_WORKER_DEBUG
systemProperties 'worker.patchmodule.file': cygpath(stRunArgsFile.path)
systemProperties 'worker.patch.policy': cygpath(testJavaPolicyFile.path)
--- 3332,3386 ----
includeEmptyDirs = false
from project.sourceSets.testapp1.output.classesDir
include("pkg2/**")
}
task createTestApps() {
dependsOn(createTestapp1Jar1)
dependsOn(createTestapp1Jar2)
}
test.dependsOn(createTestApps);
+ def modtestapps = [ "testapp2", "testapp3", "testapp4", "testapp5", "testapp6" ]
+ modtestapps.each { testapp ->
+ def testappCapital = testapp.capitalize()
+ def copyTestAppTask = task("copy${testappCapital}", type: Copy) {
+ from project.sourceSets."${testapp}".output.classesDir
+ from project.sourceSets."${testapp}".output.resourcesDir
+ into "${project.buildDir}/modules/${testapp}"
+ }
+
+ def List<String> testAppSourceDirs = []
+ project.sourceSets."${testapp}".java.srcDirs.each { dir ->
+ testAppSourceDirs += dir
+ }
+ def testappCompileTasks = project.getTasksByName("compile${testappCapital}Java", true);
+ def testappResourceTasks = project.getTasksByName("process${testappCapital}Resources", true);
+ testappCompileTasks.each { appCompileTask ->
+ appCompileTask.options.compilerArgs.addAll([
+ '-implicit:none',
+ '--module-source-path', testAppSourceDirs.join(File.pathSeparator)
+ ] )
+
+ copyTestAppTask.dependsOn(appCompileTask)
+ }
+ testappResourceTasks.each { appResourceTask ->
+ copyTestAppTask.dependsOn(appResourceTask)
+ }
+
+ createTestApps.dependsOn(copyTestAppTask)
+ }
+
test {
enabled = IS_FULL_TEST
// Properties passed to launcher tests
! systemProperty "launchertest.testapp1.jar", "build/testapp1/$testapp1JarName"
! modtestapps.each { testapp ->
! systemProperty "launchertest.${testapp}.module.path",
! "${project.buildDir}/modules/${testapp}"
! }
// Properties passed to test.util.Util
systemProperties 'worker.debug': IS_WORKER_DEBUG
systemProperties 'worker.patchmodule.file': cygpath(stRunArgsFile.path)
systemProperties 'worker.patch.policy': cygpath(testJavaPolicyFile.path)
< prev index next >