Fixed parallel kitchen tests execution
Change-Id: I81a5134bec437780b5e83ace7414868f4db35ffa
diff --git a/src/com/mirantis/mk/Ruby.groovy b/src/com/mirantis/mk/Ruby.groovy
index 323e1c9..3508ae6 100644
--- a/src/com/mirantis/mk/Ruby.groovy
+++ b/src/com/mirantis/mk/Ruby.groovy
@@ -39,21 +39,23 @@
/**
* Run kitchen tests in tests/integration
* @param environment kitchen environment (optional can be empty)
- * @param parallel run kitchen test suites in parallel (optional, default true)
+ * @param parallelTesting run kitchen test suites in parallel (optional, default true)
*/
-def runKitchenTests(environment="", parallel = true){
+def runKitchenTests(environment="", parallelTesting = true){
def common = new com.mirantis.mk.Common()
def kitchenTests=runKitchenCommand("list -b", environment)
if(kitchenTests && kitchenTests != ""){
def kitchenTestsList = kitchenTests.trim().tokenize("\n")
def kitchenTestRuns = [:]
+ common.infoMsg(String.format("Found %s kitchen test suites", kitchenTestsList.size()))
for(int i=0;i<kitchenTestsList.size();i++){
def testSuite = kitchenTestsList[i]
kitchenTestRuns["kitchen-${testSuite}-${i}"] = {
- println runKitchenCommand("converge " + testSuite, environment)
+ common.infoMsg("Running kitchen test ${testSuite}")
+ println(runKitchenCommand("converge " + testSuite, environment))
}
}
- if(parallel){
+ if(parallelTesting){
parallel kitchenTestRuns
}else{
common.serial(kitchenTestRuns)