Fix several errors

Change-Id: Ib8246e5ac229af745d598db1dca1e028f7539471
diff --git a/test-salt-formulas-env.groovy b/test-salt-formulas-env.groovy
index c278538..b8d842d 100644
--- a/test-salt-formulas-env.groovy
+++ b/test-salt-formulas-env.groovy
@@ -6,6 +6,7 @@
  */
 def common = new com.mirantis.mk.Common()
 def ruby = new com.mirantis.mk.Ruby()
+def gerrit = new com.mirantis.mk.Gerrit()
 
 def defaultGitRef, defaultGitUrl
 try {
@@ -60,14 +61,15 @@
             ruby.installKitchen()
           }
           common.infoMsg("Running part of kitchen test")
-          if (common.validInputParam(KITCHEN_ENV)) {
+          if (KITCHEN_ENV != null && !KITCHEN_ENV.isEmpty() && KITCHEN_ENV != "") {
             def cleanEnv = KITCHEN_ENV.replaceAll("\\s?SUITE=[^\\s]*", "")
             def suitePattern = java.util.regex.Pattern.compile("\\s?SUITE=([^\\s]*)")
             def suiteMatcher = suitePattern.matcher(KITCHEN_ENV)
             if (suiteMatcher.find()) {
               def suite = suiteMatcher.group(1)
+              suiteMatcher = null
               def cleanSuite = suite.replaceAll("_", "-")
-              common.infoMsg("Running kitchen test with environment:" + filteredEnvs.trim())
+              common.infoMsg("Running kitchen test with environment:" + KITCHEN_ENV.trim())
               ruby.runKitchenTests(cleanEnv, cleanSuite)
             } else {
               common.warningMsg("No SUITE was found. Running with all suites.")