< prev index next >

build.gradle

Print this page

3555 // This project is for system tests that need to run with a full SDK.
3556 // Most of them display a stage or do other things that preclude running
3557 // them in a shared JVM or as part of the "smoke test" run (which must
3558 // not pop up any windows or use audio). As such, they are only enabled
3559 // when FULL_TEST is specified, and each test runs in its own JVM
3560 project(":systemTests") {
3561 
3562     sourceSets {
3563         test
3564 
3565         // Source sets for standalone test apps (used for launcher tests)
3566         testapp1
3567 
3568         // Modular applications
3569         testapp2
3570         testapp3
3571         testapp4
3572         testapp5
3573         testapp6
3574         testscriptapp1

3575     }
3576 
3577     def nonModSrcSets = [
3578         sourceSets.test,
3579         sourceSets.testapp1
3580     ]
3581 
3582     def modSrcSets = [
3583         sourceSets.testapp2,
3584         sourceSets.testapp3,
3585         sourceSets.testapp4,
3586         sourceSets.testapp5,
3587         sourceSets.testapp6,
3588         sourceSets.testscriptapp1

3589     ]
3590 
3591     project.ext.buildModule = false
3592     project.ext.moduleRuntime = false
3593     project.ext.moduleName = "systemTests"
3594 
3595     dependencies {
3596         testCompile project(":graphics").sourceSets.test.output
3597         testCompile project(":base").sourceSets.test.output
3598         testCompile project(":controls").sourceSets.test.output
3599         testCompile project(":swing").sourceSets.test.output
3600     }
3601 
3602     def dependentProjects = [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ]
3603     commonModuleSetup(project, dependentProjects)
3604 
3605     File testJavaPolicyFile = new File(rootProject.buildDir, TESTJAVAPOLICYFILE);
3606     File testRunArgsFile = new File(rootProject.buildDir,TESTRUNARGSFILE);
3607 
3608     File stRunArgsFile = new File(project.buildDir,"st.run.args");

3668         }
3669     }
3670 
3671     task createTestapp1Jar2(type: Jar) {
3672         dependsOn compileTestapp1Java
3673         enabled = IS_FULL_TEST
3674 
3675         destinationDir = file("$buildDir/testapp1")
3676         archiveName = "jar2.jar";
3677         includeEmptyDirs = false
3678         from project.sourceSets.testapp1.java.outputDir
3679         include("pkg2/**")
3680     }
3681 
3682     task createTestApps() {
3683         dependsOn(createTestapp1Jar1)
3684         dependsOn(createTestapp1Jar2)
3685     }
3686     test.dependsOn(createTestApps);
3687 
3688     def modtestapps = [ "testapp2", "testapp3", "testapp4", "testapp5", "testapp6", "testscriptapp1" ]
3689     modtestapps.each { testapp ->
3690         def testappCapital = testapp.capitalize()
3691         def copyTestAppTask = task("copy${testappCapital}", type: Copy) {
3692             from project.sourceSets."${testapp}".java.outputDir
3693             from project.sourceSets."${testapp}".output.resourcesDir
3694             into "${project.buildDir}/modules/${testapp}"
3695         }
3696 
3697         def List<String> testAppSourceDirs = []
3698         project.sourceSets."${testapp}".java.srcDirs.each { dir ->
3699             testAppSourceDirs += dir
3700         }
3701         def testappCompileTasks = project.getTasksByName("compile${testappCapital}Java", true);
3702         def testappResourceTasks = project.getTasksByName("process${testappCapital}Resources", true);
3703         testappCompileTasks.each { appCompileTask ->
3704             appCompileTask.options.compilerArgs.addAll([
3705                 '-implicit:none',
3706                 '--module-source-path', testAppSourceDirs.join(File.pathSeparator),
3707                 ] )
3708             if (project.hasProperty('testModulePathArgs')) {

3555 // This project is for system tests that need to run with a full SDK.
3556 // Most of them display a stage or do other things that preclude running
3557 // them in a shared JVM or as part of the "smoke test" run (which must
3558 // not pop up any windows or use audio). As such, they are only enabled
3559 // when FULL_TEST is specified, and each test runs in its own JVM
3560 project(":systemTests") {
3561 
3562     sourceSets {
3563         test
3564 
3565         // Source sets for standalone test apps (used for launcher tests)
3566         testapp1
3567 
3568         // Modular applications
3569         testapp2
3570         testapp3
3571         testapp4
3572         testapp5
3573         testapp6
3574         testscriptapp1
3575         testscriptapp2
3576     }
3577 
3578     def nonModSrcSets = [
3579         sourceSets.test,
3580         sourceSets.testapp1
3581     ]
3582 
3583     def modSrcSets = [
3584         sourceSets.testapp2,
3585         sourceSets.testapp3,
3586         sourceSets.testapp4,
3587         sourceSets.testapp5,
3588         sourceSets.testapp6,
3589         sourceSets.testscriptapp1,
3590         sourceSets.testscriptapp2
3591     ]
3592 
3593     project.ext.buildModule = false
3594     project.ext.moduleRuntime = false
3595     project.ext.moduleName = "systemTests"
3596 
3597     dependencies {
3598         testCompile project(":graphics").sourceSets.test.output
3599         testCompile project(":base").sourceSets.test.output
3600         testCompile project(":controls").sourceSets.test.output
3601         testCompile project(":swing").sourceSets.test.output
3602     }
3603 
3604     def dependentProjects = [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ]
3605     commonModuleSetup(project, dependentProjects)
3606 
3607     File testJavaPolicyFile = new File(rootProject.buildDir, TESTJAVAPOLICYFILE);
3608     File testRunArgsFile = new File(rootProject.buildDir,TESTRUNARGSFILE);
3609 
3610     File stRunArgsFile = new File(project.buildDir,"st.run.args");

3670         }
3671     }
3672 
3673     task createTestapp1Jar2(type: Jar) {
3674         dependsOn compileTestapp1Java
3675         enabled = IS_FULL_TEST
3676 
3677         destinationDir = file("$buildDir/testapp1")
3678         archiveName = "jar2.jar";
3679         includeEmptyDirs = false
3680         from project.sourceSets.testapp1.java.outputDir
3681         include("pkg2/**")
3682     }
3683 
3684     task createTestApps() {
3685         dependsOn(createTestapp1Jar1)
3686         dependsOn(createTestapp1Jar2)
3687     }
3688     test.dependsOn(createTestApps);
3689 
3690     def modtestapps = [ "testapp2", "testapp3", "testapp4", "testapp5", "testapp6", "testscriptapp1", "testscriptapp2" ]
3691     modtestapps.each { testapp ->
3692         def testappCapital = testapp.capitalize()
3693         def copyTestAppTask = task("copy${testappCapital}", type: Copy) {
3694             from project.sourceSets."${testapp}".java.outputDir
3695             from project.sourceSets."${testapp}".output.resourcesDir
3696             into "${project.buildDir}/modules/${testapp}"
3697         }
3698 
3699         def List<String> testAppSourceDirs = []
3700         project.sourceSets."${testapp}".java.srcDirs.each { dir ->
3701             testAppSourceDirs += dir
3702         }
3703         def testappCompileTasks = project.getTasksByName("compile${testappCapital}Java", true);
3704         def testappResourceTasks = project.getTasksByName("process${testappCapital}Resources", true);
3705         testappCompileTasks.each { appCompileTask ->
3706             appCompileTask.options.compilerArgs.addAll([
3707                 '-implicit:none',
3708                 '--module-source-path', testAppSourceDirs.join(File.pathSeparator),
3709                 ] )
3710             if (project.hasProperty('testModulePathArgs')) {
< prev index next >