From 1cbfa73f67a09a3dfb6b4636901ccb2f78307d46 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Mon, 27 Feb 2017 17:59:19 +0300 Subject: [PATCH] tests: Use 'prefix' property in run_external task --- backend.native/tests/build.gradle | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index fc1f56b8ac6..3d0ced6ecb2 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -46,7 +46,7 @@ task run() { task run_external () { // TODO Consider test output directory cleaning before execution. // TODO Consider using some logger instead of println - // Create tasks for external tests + // Create tasks for external tests. externalTestsDir.eachDirRecurse { // Skip build directory and directories without *.kt files. if (it.name == "build" || it.listFiles().count {it.name.endsWith(".kt")} == 0) { @@ -60,9 +60,16 @@ task run_external () { groupDirectory = "$taskDirectory" } } + + // Set up dependencies. def testTasks = tasks.withType(RunExternalTestGroup).matching { it.enabled } + String prefix = project.findProperty("prefix") + if (prefix != null) { + testTasks = testTasks.matching { it.name.startsWith(prefix) } + } dependsOn(testTasks) + // Collect results in one json. doLast { Map> results = [:] def statistics = new RunExternalTestGroup.Statistics()