Misc debugging edits
jjb/pipeline/voltha/master/bbsim-tests.groovy
jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
--------------------------------------------------
o [VOL-5124 DEBUG] Display permisisons in ~/.volt
o Display a banner for log readabilty around pgrep/pkill output.
Change-Id: Ibc757db01c33a9cec05c953f376218c0f99c6144
diff --git a/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy b/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
index a8663af..45349d9 100644
--- a/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-2.12/bbsim-tests.groovy
@@ -99,8 +99,23 @@
helmTeardown(['default', infraNamespace, volthaNamespace])
}
+ // -----------------------------------------------------------------------
+ // Verify pgrep/pkill behavior before replacing ps | kill -9
+ // -----------------------------------------------------------------------
+ script {
+ println('''
+
+** -----------------------------------------------------------------------
+** pgrep process list for port-forward (pre-pkill)
+** -----------------------------------------------------------------------
+''')
+ sh('''pgrep --list-full port-forward || true''')
+ }
+
// Comment timeout() if we hang (fix it VS mask problem)
// timeout(1) {
+ // -----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
sh(returnStdout:true, script: '''
sync
cat <<EOM
@@ -110,8 +125,20 @@
** -----------------------------------------------------------------------
EOM
[[ $(pgrep --count port-forward) -gt 0 ]] && pkill --echo 'port-forward'
- pgrep --list-full port-forward || true
''')
+
+ // -----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
+ script {
+ println('''
+
+** -----------------------------------------------------------------------
+** pgrep process list for port-forward (post-pkill)
+** -----------------------------------------------------------------------
+''')
+ sh('''pgrep --list-full port-forward || true''')
+ }
+
} // timeout(15)
} // teardown()
// timeout(1)
@@ -266,7 +293,7 @@
sh('''ps e -ww -A | grep "_TAG=kail-startup"''')
}
- / -----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
// stop logging
// -----------------------------------------------------------------------
sh """
@@ -558,6 +585,23 @@
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
+ stage('voltctl [DEBUG]')
+ {
+ steps
+ {
+ println("${iam} Display umask")
+ sh('umask')
+
+ println("${iam} Checking voltctl config permissions")
+ sh('/bin/ls -ld ~/.volt || true')
+
+ println("${iam} Running find")
+ sh('/bin/ls -l ~/.volt')
+ } // steps
+ } // stage
+
+ // -----------------------------------------------------------------------
+ // -----------------------------------------------------------------------
stage('Load image in kind nodes')
{
when {
@@ -597,12 +641,13 @@
Boolean logging = test['logging'].toBoolean()
String testLogging = (logging) ? 'True' : 'False'
- println([
- "Executing test ${target}",
- "on workflow ${workflow}",
- "with logging ${testLogging}",
- "and extra flags ${flags}",
- ].join(' ')
+ print("""
+
+** -----------------------------------------------------------------------
+** Executing test ${target} on workflow ${workflow} with logging ${testLogging} and extra flags ${flags}"
+** -----------------------------------------------------------------------
+
+)
try {
println "Executing test ${target}: ENTER"