Revert "Refactored test salt formulas env pipeline"

This reverts commit c0f3ba2a62a5749a41528f17e08a927b21df7d05.

Change-Id: Iab49fac87b92cd1094fac5e4f18d833e56c6f784
diff --git a/test-salt-formulas-env.groovy b/test-salt-formulas-env.groovy
index 1f646b9..64b089e 100644
--- a/test-salt-formulas-env.groovy
+++ b/test-salt-formulas-env.groovy
@@ -62,10 +62,14 @@
           common.infoMsg("Running part of kitchen test")
           if (KITCHEN_ENV != null && !KITCHEN_ENV.isEmpty() && KITCHEN_ENV != "") {
             def cleanEnv = KITCHEN_ENV.replaceAll("\\s?SUITE=[^\\s]*", "")
-            def suite = ruby.getSuiteName(KITCHEN_ENV)
-            if (suite && suite != "") {
+            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:" + KITCHEN_ENV.trim())
-              ruby.runKitchenTests(cleanEnv, suite)
+              ruby.runKitchenTests(cleanEnv, cleanSuite)
             } else {
               common.warningMsg("No SUITE was found. Running with all suites.")
               ruby.runKitchenTests(cleanEnv, "")
@@ -89,4 +93,4 @@
       println readFile(".kitchen/logs/kitchen.log")
     }
   }
-}
+}
\ No newline at end of file