VOL-5155 - triage failure in periodic-voltha-test-bbsim-2.12

vars/pgrep_proc.groovy
vars/pkill_proc.groovy
jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
--------------------------------------------------
  o Re-home pgrep_proc and pkill_proc inlined code blocks
    into standalone vars/ scripts.
  o Cleanup npm-groovy-warnings.
  o Add banners in {pgrep,pkill} to help diagnose the silent
    exception reported during job runs yesterday.

Change-Id: I73644b748139612b32ce2dd56e5a97c04eb5cac0
diff --git a/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy b/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
index 1f82010..f26eb5a 100644
--- a/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
@@ -234,6 +234,7 @@
 	    println("${iam}: Shutdown process $proc")
 	    pgrep_proc(proc)
 	    pkill_proc(proc)
+	    pgrep_proc(proc)
 	    println("${iam}: LEAVE")
         }
 
@@ -271,6 +272,7 @@
       fi
       ps aux | grep port-forward
       """
+
         script {
 	    String proc = 'port-forward'
 
@@ -576,11 +578,14 @@
 		println("${iam}: ENTER")
 
                 def tests = readYaml text: testTargets
+                println("** [DEBUG]: tests=$tests")
 
 		String buffer = []    
 		tests.eachWithIndex { test, idx ->
 		    String  target = test['target']
+		    println(" ** Build test index [$idx]: target=$target")
 		    buffer.add("      test[${idx}]: ${target}\n")
+		    println("** buffer contains: $buffer")
 	        }
 
 		println("** Testing index: tests-to-run")
@@ -588,8 +593,9 @@
 		println('''
 ** -----------------------------------------------------------------------
 ** NOTE: For odd/silent job failures verify a few details
-**   - All tests mentioned in the index have been processed.
+**   - All tests mentioned in the tests-to-run index were logged.
 **   - Test suites display ENTER/LEAVE mesasge pairs.
+**   - Processing terminated prematurely when LEAVE strings are missing.
 ** -----------------------------------------------------------------------
 ''')
 		tests.eachWithIndex { test, idx ->