File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ target(testApp: "The test app implementation target") {
102102 runIntegrationTests()
103103 produceReports()
104104 }
105+ catch (Exception ex) {
106+ ex. printStackTrace()
107+ }
105108 finally {
106109 processResults()
107110 }
@@ -380,5 +383,23 @@ def resolveTestResources(patternResolver) {
380383}
381384
382385def getTestNames (testNamesString ) {
383- testNamesString ? testNamesString. tokenize(). collect {" ${ it} Tests" } : null
386+ // If a list of test class names is provided, split it into ant
387+ // file patterns.
388+ if (testNamesString) {
389+ testNamesString = testNamesString. split(/ \s +/ ). collect {
390+ // If the test name includes a package, replace it with the
391+ // corresponding file path.
392+ if (it. indexOf(' .' ) != -1 ) {
393+ it = it. replace(' .' as char , ' /' as char )
394+ }
395+ else {
396+ // Allow the test class to be in any package.
397+ it = " **/$it "
398+ }
399+
400+ return " ${ it} Tests"
401+ }
402+ }
403+
404+ return testNamesString
384405}
You can’t perform that action at this time.
0 commit comments