You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2015/12/11 23:05:52 UTC
[19/50] [abbrv] incubator-geode git commit: GEODE-638: Add build task
to allow for custom set of tests to be run
GEODE-638: Add build task to allow for custom set of tests to be run
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a6398d91
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a6398d91
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a6398d91
Branch: refs/heads/feature/GEODE-291
Commit: a6398d919685d63c2bc89c1f4f605a5b73f3f257
Parents: eddef32
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Dec 7 15:25:15 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Tue Dec 8 09:34:52 2015 -0800
----------------------------------------------------------------------
build.gradle | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a6398d91/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index b5465b8..0c94573 100755
--- a/build.gradle
+++ b/build.gradle
@@ -386,7 +386,23 @@ subprojects {
//I'm hoping this might deal with SOME OOMEs I've seen
forkEvery 30
}
-
+
+ // By proving a file with an arbitrary list of test classes, we can select only those
+ // tests to run. Activated using -Dcustom.tests=<file> customTest
+ def customTestList = []
+ def customTestFile = System.getProperty('custom.tests')
+ if (customTestFile != null) {
+ new File(customTestFile).eachLine { customTestList << it }
+ }
+
+ task customTest(type:Test) {
+ include { x ->
+ (x.isDirectory() || customTestList.any { y -> x.getName().contains(y) } ) ? true : false
+ }
+
+ forkEvery 30
+ }
+
// apply common test configuration
gradle.taskGraph.whenReady( { graph ->
tasks.withType(Test).each { test ->