Fix for NPE caused by missing key
Change-Id: Ief049937c5bf7b63f0b87fdccf420df36814210a
diff --git a/TestON/JenkinsFile/FUNCJenkinsFile b/TestON/JenkinsFile/FUNCJenkinsFile
index d7d237d..9d1af0a 100644
--- a/TestON/JenkinsFile/FUNCJenkinsFile
+++ b/TestON/JenkinsFile/FUNCJenkinsFile
@@ -54,7 +54,7 @@
for ( String test : FUNC.keySet() ){
def toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
- def pureTestName = FUNC[ test ][ "test" ].split().head()
+ def pureTestName = ( FUNC[ test ].containsKey( "test" ) : FUNC[ test ][ "test" ].split().head() ? test )
tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
FUNC, graph_generator_file, graph_saved_directory )
}
diff --git a/TestON/JenkinsFile/HAJenkinsFile b/TestON/JenkinsFile/HAJenkinsFile
index 1eae790..09f692b 100644
--- a/TestON/JenkinsFile/HAJenkinsFile
+++ b/TestON/JenkinsFile/HAJenkinsFile
@@ -54,7 +54,7 @@
for ( String test : HA.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
- def pureTestName = HA[ test ][ "test" ].split().head()
+ def pureTestName = ( HA[ test ].containsKey( "test" ) : HA[ test ][ "test" ].split().head() ? test )
tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
HA, graph_generator_file, graph_saved_directory )
}
diff --git a/TestON/JenkinsFile/SRHAJenkinsFile b/TestON/JenkinsFile/SRHAJenkinsFile
index cbef08e..e218a04 100644
--- a/TestON/JenkinsFile/SRHAJenkinsFile
+++ b/TestON/JenkinsFile/SRHAJenkinsFile
@@ -56,7 +56,7 @@
for ( String test : SRHA.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
- def pureTestName = SRHA[ test ][ "test" ].split().head()
+ def pureTestName = ( SRHA[ test ].containsKey( "test" ) : SRHA[ test ][ "test" ].split().head() ? test )
tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
SRHA, graph_generator_file, graph_saved_directory )
}
diff --git a/TestON/JenkinsFile/SRJenkinsFile b/TestON/JenkinsFile/SRJenkinsFile
index 1832b6c..06e1ed6 100644
--- a/TestON/JenkinsFile/SRJenkinsFile
+++ b/TestON/JenkinsFile/SRJenkinsFile
@@ -56,8 +56,8 @@
for ( String test : SR.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
- def pureTestName = SR[ test ][ "test" ].split().head()
- tests[stepName] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
+ def pureTestName = ( SR[ test ].containsKey( "test" ) : SR[ test ][ "test" ].split().head() ? test )
+ tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
SR, graph_generator_file, graph_saved_directory )
}
diff --git a/TestON/JenkinsFile/USECASEJenkinsFile b/TestON/JenkinsFile/USECASEJenkinsFile
index 8a3e995..2394520 100644
--- a/TestON/JenkinsFile/USECASEJenkinsFile
+++ b/TestON/JenkinsFile/USECASEJenkinsFile
@@ -49,7 +49,7 @@
for ( String test : USECASE.keySet() ){
toBeRun = testsToRun.contains( test )
def stepName = ( toBeRun ? "" : "Not " ) + "Running $test"
- def pureTestName = USECASE[ test ][ "test" ].split().head()
+ def pureTestName = ( USECASE[ test ].containsKey( "test" ) : USECASE[ test ][ "test" ].split().head() ? test )
tests[ stepName ] = funcs.runTest( test, toBeRun, prop, pureTestName, false,
USECASE, graph_generator_file, graph_saved_directory )
}