Avoid errors from empty variables

- Make sure vairables are initialized as empty maps instead of None
- Fix some style issues

Change-Id: I39d3bea85af25e264ee560f7ceba492adc364887
diff --git a/TestON/JenkinsFile/CommonJenkinsFile.groovy b/TestON/JenkinsFile/CommonJenkinsFile.groovy
index 763f8d9..54cec80 100644
--- a/TestON/JenkinsFile/CommonJenkinsFile.groovy
+++ b/TestON/JenkinsFile/CommonJenkinsFile.groovy
@@ -29,7 +29,6 @@
 
 category = null
 prop = null
-testsToRun = null
 testsToRunStrList = null
 branch = null
 branchWithPrefix = null
@@ -41,6 +40,7 @@
 isSCPF = false
 pipelineTimeout = null
 
+testsToRun = [:]
 testsFromList = [:]
 graphPaths = [:]
 pipeline = [:]
@@ -141,7 +141,7 @@
         toBeRun = testsToRun.keySet().contains( JenkinsLabel )
         stepName = ( toBeRun ? "" : "Not " ) + "Running $JenkinsLabel"
 
-        TestONTest = testsToRun[ JenkinsLabel ].keySet().contains( "test" ) ? testsToRun[ JenkinsLabel ][ "test" ] : JenkinsLabel
+        TestONTest = ( toBeRun && testsToRun[ JenkinsLabel ].keySet().contains( "test" ) ) ? testsToRun[ JenkinsLabel ][ "test" ] : JenkinsLabel
 
         pipeline[ stepName ] = runTest( JenkinsLabel,
                                         toBeRun,