Created
June 14, 2011 22:31
-
-
Save kellyrob99/1026097 to your computer and use it in GitHub Desktop.
Gradle rule to execute arbitrary groups of tests in isolation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add a rule that supports executing tests based on a series of comma delimited patterns(ant glob patterns). | |
*/ | |
tasks.addRule("Pattern: testMulti<Name>,<Name2> will test **/<Name>.class,**/<Name2>.class") {String taskName -> | |
if (taskName.startsWith("testMulti")) | |
{ | |
tasks.add(taskName).dependsOn(test) | |
test.includes = taskName.substring(9).split(',').collect {"**/${it}.class"} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment