3225 include drtClasses
3226 }
3227
3228 if (IS_COMPILE_WEBKIT) {
3229 assemble.dependsOn compileGenerated, drtJar
3230 }
3231 }
3232
3233 // This project is for system tests that need to run with a full SDK.
3234 // Most of them display a stage or do other things that preclude running
3235 // them in a shared JVM or as part of the "smoke test" run (which must
3236 // not pop up any windows or use audio). As such, they are only enabled
3237 // when FULL_TEST is specified, and each test runs in its own JVM
3238 project(":systemTests") {
3239
3240 sourceSets {
3241 test
3242
3243 // Source sets for standalone test apps (used for launcher tests)
3244 testapp1
3245 testapp2
3246 }
3247
3248 project.ext.buildModule = false
3249 project.ext.moduleRuntime = false
3250 project.ext.moduleName = "systemTests"
3251
3252 dependencies {
3253 testCompile project(":graphics").sourceSets.test.output
3254 testCompile project(":base").sourceSets.test.output
3255 testCompile project(":controls").sourceSets.test.output
3256 testCompile project(":swing").sourceSets.test.output
3257 }
3258
3259 commonModuleSetup(project, [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ])
3260
3261 File testJavaPolicyFile = new File(rootProject.buildDir, TESTJAVAPOLICYFILE);
3262 File testRunArgsFile = new File(rootProject.buildDir,TESTRUNARGSFILE);
3263
3264 File stRunArgsFile = new File(project.buildDir,"st.run.args");
3265
3311 attributes(
3312 "Main-Class" : "com.javafx.main.Main",
3313 "JavaFX-Version" : "2.2",
3314 "JavaFX-Application-Class" : "testapp.HelloWorld",
3315 "JavaFX-Class-Path" : "jar2.jar"
3316 )
3317 }
3318 }
3319
3320 task createTestapp1Jar2(type: Jar) {
3321 dependsOn compileTestapp1Java
3322 enabled = IS_FULL_TEST
3323
3324 destinationDir = file("$buildDir/testapp1")
3325 archiveName = "jar2.jar";
3326 includeEmptyDirs = false
3327 from project.sourceSets.testapp1.output.classesDir
3328 include("pkg2/**")
3329 }
3330
3331 def List<String> testApp2SourceDirs = []
3332 project.sourceSets.testapp2.java.srcDirs.each { dir ->
3333 testApp2SourceDirs += dir
3334 }
3335 compileTestapp2Java.options.compilerArgs.addAll([
3336 '-implicit:none',
3337 '--module-source-path', testApp2SourceDirs.join(File.pathSeparator)
3338 ] )
3339
3340 task createTestApps() {
3341 dependsOn(createTestapp1Jar1)
3342 dependsOn(createTestapp1Jar2)
3343 dependsOn(compileTestapp2Java)
3344 }
3345 test.dependsOn(createTestApps);
3346
3347 test {
3348 enabled = IS_FULL_TEST
3349
3350 // Properties passed to launcher tests
3351 systemProperties 'launchertest.testapp1.jar': "build/testapp1/$testapp1JarName"
3352 systemProperties 'launchertest.testapp2.module.path': project.sourceSets.testapp2.output.classesDir
3353
3354 // Properties passed to test.util.Util
3355 systemProperties 'worker.debug': IS_WORKER_DEBUG
3356 systemProperties 'worker.patchmodule.file': cygpath(stRunArgsFile.path)
3357 systemProperties 'worker.patch.policy': cygpath(testJavaPolicyFile.path)
3358 systemProperties 'worker.java.cmd': JAVA
3359
3360 if (!IS_USE_ROBOT) {
3361 // Disable all robot-based visual tests
3362 exclude("test/robot/**");
3363 }
3364 if (!IS_AWT_TEST) {
3365 // Disable all AWT-based tests
3366 exclude("**/javafx/embed/swing/*.*");
3367 exclude("**/com/sun/javafx/application/Swing*.*");
3368 }
3369
3370 forkEvery = 1
3371 }
3372 }
|
3225 include drtClasses
3226 }
3227
3228 if (IS_COMPILE_WEBKIT) {
3229 assemble.dependsOn compileGenerated, drtJar
3230 }
3231 }
3232
3233 // This project is for system tests that need to run with a full SDK.
3234 // Most of them display a stage or do other things that preclude running
3235 // them in a shared JVM or as part of the "smoke test" run (which must
3236 // not pop up any windows or use audio). As such, they are only enabled
3237 // when FULL_TEST is specified, and each test runs in its own JVM
3238 project(":systemTests") {
3239
3240 sourceSets {
3241 test
3242
3243 // Source sets for standalone test apps (used for launcher tests)
3244 testapp1
3245
3246 // Modular applications
3247 testapp2
3248 testapp3
3249 testapp4
3250 testapp5
3251 testapp6
3252 }
3253
3254 project.ext.buildModule = false
3255 project.ext.moduleRuntime = false
3256 project.ext.moduleName = "systemTests"
3257
3258 dependencies {
3259 testCompile project(":graphics").sourceSets.test.output
3260 testCompile project(":base").sourceSets.test.output
3261 testCompile project(":controls").sourceSets.test.output
3262 testCompile project(":swing").sourceSets.test.output
3263 }
3264
3265 commonModuleSetup(project, [ 'base', 'graphics', 'controls', 'media', 'web', 'swing', 'fxml' ])
3266
3267 File testJavaPolicyFile = new File(rootProject.buildDir, TESTJAVAPOLICYFILE);
3268 File testRunArgsFile = new File(rootProject.buildDir,TESTRUNARGSFILE);
3269
3270 File stRunArgsFile = new File(project.buildDir,"st.run.args");
3271
3317 attributes(
3318 "Main-Class" : "com.javafx.main.Main",
3319 "JavaFX-Version" : "2.2",
3320 "JavaFX-Application-Class" : "testapp.HelloWorld",
3321 "JavaFX-Class-Path" : "jar2.jar"
3322 )
3323 }
3324 }
3325
3326 task createTestapp1Jar2(type: Jar) {
3327 dependsOn compileTestapp1Java
3328 enabled = IS_FULL_TEST
3329
3330 destinationDir = file("$buildDir/testapp1")
3331 archiveName = "jar2.jar";
3332 includeEmptyDirs = false
3333 from project.sourceSets.testapp1.output.classesDir
3334 include("pkg2/**")
3335 }
3336
3337 task createTestApps() {
3338 dependsOn(createTestapp1Jar1)
3339 dependsOn(createTestapp1Jar2)
3340 }
3341 test.dependsOn(createTestApps);
3342
3343 def modtestapps = [ "testapp2", "testapp3", "testapp4", "testapp5", "testapp6" ]
3344 modtestapps.each { testapp ->
3345 def testappCapital = testapp.capitalize()
3346 def copyTestAppTask = task("copy${testappCapital}", type: Copy) {
3347 from project.sourceSets."${testapp}".output.classesDir
3348 from project.sourceSets."${testapp}".output.resourcesDir
3349 into "${project.buildDir}/modules/${testapp}"
3350 }
3351
3352 def List<String> testAppSourceDirs = []
3353 project.sourceSets."${testapp}".java.srcDirs.each { dir ->
3354 testAppSourceDirs += dir
3355 }
3356 def testappCompileTasks = project.getTasksByName("compile${testappCapital}Java", true);
3357 def testappResourceTasks = project.getTasksByName("process${testappCapital}Resources", true);
3358 testappCompileTasks.each { appCompileTask ->
3359 appCompileTask.options.compilerArgs.addAll([
3360 '-implicit:none',
3361 '--module-source-path', testAppSourceDirs.join(File.pathSeparator)
3362 ] )
3363
3364 copyTestAppTask.dependsOn(appCompileTask)
3365 }
3366 testappResourceTasks.each { appResourceTask ->
3367 copyTestAppTask.dependsOn(appResourceTask)
3368 }
3369
3370 createTestApps.dependsOn(copyTestAppTask)
3371 }
3372
3373 test {
3374 enabled = IS_FULL_TEST
3375
3376 // Properties passed to launcher tests
3377 systemProperty "launchertest.testapp1.jar", "build/testapp1/$testapp1JarName"
3378 modtestapps.each { testapp ->
3379 systemProperty "launchertest.${testapp}.module.path",
3380 "${project.buildDir}/modules/${testapp}"
3381 }
3382
3383 // Properties passed to test.util.Util
3384 systemProperties 'worker.debug': IS_WORKER_DEBUG
3385 systemProperties 'worker.patchmodule.file': cygpath(stRunArgsFile.path)
3386 systemProperties 'worker.patch.policy': cygpath(testJavaPolicyFile.path)
3387 systemProperties 'worker.java.cmd': JAVA
3388
3389 if (!IS_USE_ROBOT) {
3390 // Disable all robot-based visual tests
3391 exclude("test/robot/**");
3392 }
3393 if (!IS_AWT_TEST) {
3394 // Disable all AWT-based tests
3395 exclude("**/javafx/embed/swing/*.*");
3396 exclude("**/com/sun/javafx/application/Swing*.*");
3397 }
3398
3399 forkEvery = 1
3400 }
3401 }
|