< prev index next >

./build.gradle

Print this page

        

*** 2873,2890 **** project(":systemTests") { dependencies { testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output } test { enabled = IS_FULL_TEST - if (IS_JDK9_TEST) { - enabled = false //FIXME: support JDK9 - logger.info("JDK9 Testing disabled for systemTests") - } if (!IS_USE_ROBOT) { // Disable all robot-based visual tests exclude("test/robot/**"); } if (!IS_AWT_TEST) { --- 2873,2894 ---- project(":systemTests") { dependencies { testCompile project(":graphics").sourceSets.test.output testCompile project(":base").sourceSets.test.output + testCompile project(":controls").sourceSets.test.output + testCompile project(":swing").sourceSets.test.output } + Set<String> testInclude = [ "test/**" ] + configureJDK9tests(project, [ "base", "graphics", "controls", "swing", "fxml", "web" ], + null, testInclude, + project.projectDir.path + "/src/test/addExports" + ) + test { enabled = IS_FULL_TEST if (!IS_USE_ROBOT) { // Disable all robot-based visual tests exclude("test/robot/**"); } if (!IS_AWT_TEST) {
*** 3766,3778 **** def sdkTask = tasks.getByName("sdk${t.capital}"); sdkTask.dependsOn(buildModulesTask) } sdk.dependsOn(buildModules) - task buildModulesTests { - } - void configureJDK9tests( Project p, List<String> moduleDeps, Set<String> patchInc, Set<String> testsInc, --- 3770,3779 ----
*** 3797,3823 **** def modularSdkDirName = "${targetProperties.platformPrefix}modular-sdk" def modularSdkDir = "${rootProject.buildDir}/${modularSdkDirName}" def modulesDir = "${modularSdkDir}/modules" logger.info("configuring $p.name for modular test copy"); def testingDir = "${rootProject.buildDir}/${targetProperties.platformPrefix}testing"; def patchesDir = new File("${testingDir}/modules"); String javaLibraryPath = "${rootProject.buildDir}/sdk/$targetProperties.libDest" ! def jdk9patchesBaseDir = new File("${testingDir}/modules/$p.moduleName"); ! def jdk9patchesTestDir = new File("${testingDir}/tests/$p.moduleName"); def srcClassesDir = "${p.buildDir}/${targetProperties.platformPrefix}module-classes" Task classes = p.task("jdk9CopyClasses${t.capital}", type: Copy, dependsOn: [p.classes]) { from srcClassesDir into jdk9patchesBaseDir } Task shims = p.task("jdk9CopyShims${t.capital}", type: Copy, dependsOn: [p.testClasses]) { //from p.sourceSets.test.output.classesDir from p.sourceSets.test.output into jdk9patchesBaseDir if (patchInc != null) { include patchInc } else { --- 3798,3843 ---- def modularSdkDirName = "${targetProperties.platformPrefix}modular-sdk" def modularSdkDir = "${rootProject.buildDir}/${modularSdkDirName}" def modulesDir = "${modularSdkDir}/modules" + boolean useModule = true + String moduleName + if(!p.hasProperty('moduleName')) { + useModule = false + moduleName = "systemTests" + } else { + moduleName = p.moduleName + } + logger.info("configuring $p.name for modular test copy"); def testingDir = "${rootProject.buildDir}/${targetProperties.platformPrefix}testing"; def patchesDir = new File("${testingDir}/modules"); + File patchPolicyFile = new File("${testingDir}/java.patch.policy"); + String javaLibraryPath = "${rootProject.buildDir}/sdk/$targetProperties.libDest" ! def jdk9patchesBaseDir = new File("${testingDir}/modules/$moduleName"); ! def jdk9patchesTestDir = new File("${testingDir}/tests/$moduleName"); ! ! p.files(patchPolicyFile); def srcClassesDir = "${p.buildDir}/${targetProperties.platformPrefix}module-classes" Task classes = p.task("jdk9CopyClasses${t.capital}", type: Copy, dependsOn: [p.classes]) { + + enabled = useModule + from srcClassesDir into jdk9patchesBaseDir } Task shims = p.task("jdk9CopyShims${t.capital}", type: Copy, dependsOn: [p.testClasses]) { //from p.sourceSets.test.output.classesDir + + enabled = useModule + from p.sourceSets.test.output into jdk9patchesBaseDir if (patchInc != null) { include patchInc } else {
*** 3830,3841 **** doLast() { logger.info("project $p.name finished jdk9CopyShims to $jdk9patchesBaseDir"); } } ! Task tests = p.task("jdk9CopyTests${t.capital}", type: Copy, dependsOn: [p.testClasses]) { ! //from p.sourceSets.test.output.classesDir from p.sourceSets.test.output into jdk9patchesTestDir if (patchInc != null) { exclude patchInc } --- 3850,3860 ---- doLast() { logger.info("project $p.name finished jdk9CopyShims to $jdk9patchesBaseDir"); } } ! Task alltests = p.task("jdk9CopyTests${t.capital}", type: Copy, dependsOn: [p.testClasses]) { from p.sourceSets.test.output into jdk9patchesTestDir if (patchInc != null) { exclude patchInc }
*** 3848,3875 **** doLast() { logger.info("project $p.name finished jdk9CopyTests to $jdk9patchesTestDir"); } } ! Task jdk9testsTask = p.task("jdk9tests${t.capital}", dependsOn: [classes, shims, tests]) { doLast() { ! logger.info("project $p.name finished jdk9tests${t.capital}"); } } ! // not found ? ! //buildModulesTests.dependsOn(jdk9testsTask); FileCollection testclasspath = p.files(p.configurations.jdk9test) p.test.dependsOn jdk9testsTask if (moduleDeps != null) { moduleDeps.each() {s-> logger.info("adding dep to project $p.name $s"); Project pdep = rootProject.project(s); ! jdk9testsTask.dependsOn pdep.jdk9testClasses testclasspath += p.files(pdep.ext.jdk9patchesTestDir); } } --- 3867,3916 ---- doLast() { logger.info("project $p.name finished jdk9CopyTests to $jdk9patchesTestDir"); } } ! // create & use just one of these per platform ! String nameis = "moduleTestPatchPolicy${t.capital}" ! Task patchPerms = null ! if (rootProject.hasProperty(nameis)) { ! patchPerms = rootProject.tasks[nameis] ! } else { ! patchPerms = rootProject.task(nameis) { ! outputs.file(patchPolicyFile) doLast() { ! logger.info("Creating test patch.policy file ${patchPolicyFile}") ! ! delete(patchPolicyFile) ! mkdir(testingDir) ! ! [ "base", "graphics", "controls", "fxml", "swing", "web", ].each { mn -> ! String themod = file("${patchesDir}/javafx.${mn}").toURI() ! patchPolicyFile << "grant codeBase \"${themod}\" {\n" + ! " permission java.security.AllPermission;\n" + ! "};\n" ! } ! } } } ! Task jdk9testsTask = p.task("jdk9tests${t.capital}", dependsOn: [classes, shims, alltests, patchPerms ]) { ! doLast() { ! logger.info("project $p.name finished jdk9tests${t.capital}"); ! } ! } FileCollection testclasspath = p.files(p.configurations.jdk9test) p.test.dependsOn jdk9testsTask if (moduleDeps != null) { moduleDeps.each() {s-> logger.info("adding dep to project $p.name $s"); Project pdep = rootProject.project(s); ! def jdk9Task = pdep.tasks.getByName("jdk9tests${t.capital}"); ! jdk9testsTask.dependsOn jdk9Task; testclasspath += p.files(pdep.ext.jdk9patchesTestDir); } }
*** 3897,3914 **** p.sourceSets.test.runtimeClasspath = testclasspath } String bcp = "-Xbootclasspath/a:" + rootProject.projectDir.path + "/buildSrc/build/libs/buildSrc.jar" ! systemProperties 'worker.debug': true //DAVE ! systemProperties 'worker.library.path': javaLibraryPath ! systemProperties 'worker.xpatch.dir': patchesDir.path if (addExportsFile != null) { ! systemProperties 'worker.exports.file': addExportsFile } ! systemProperties 'worker.classpath.file': p.ext.argclasspathFile ! systemProperties 'worker.java9': JAVA9 //systemProperties 'prism.order': 'sw' //systemProperties 'glass.platform': 'Monocle' //systemProperties
'glass.len': 'headless' --- 3938,3959 ---- p.sourceSets.test.runtimeClasspath = testclasspath } String bcp = "-Xbootclasspath/a:" + rootProject.projectDir.path + "/buildSrc/build/libs/buildSrc.jar" ! systemProperties 'worker.debug': false ! systemProperties 'worker.library.path': cygpath(javaLibraryPath) ! systemProperties 'worker.xpatch.dir': cygpath(patchesDir.path) if (addExportsFile != null) { ! systemProperties 'worker.exports.file': cygpath(addExportsFile) } ! systemProperties 'worker.classpath.file': cygpath(p.ext.argclasspathFile) ! systemProperties 'worker.java.cmd': JAVA9 ! ! systemProperties 'worker.isJDK9': true ! ! systemProperties 'worker.patch.policy': cygpath(patchPolicyFile.path) //systemProperties 'prism.order': 'sw' //systemProperties 'glass.platform': 'Monocle' //systemProperties
'glass.len': 'headless'
< prev index next >