osmith has uploaded this change for review.
ttcn3-bts-test: show respawn count at the end
As mentioned in the last commit, we currently must use respawn.sh to be
able to recover from clock skew errors seen in jenkins. Let's display
the respawn count at the end as warning.
Related: OS#6794
Change-Id: I4e5c3dd46ec682bfd79f2328195b0050fe3f186d
---
M ttcn3-bts-test/jenkins.sh
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/84/40784/1
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index 5d5629d..2e41d29 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -229,6 +229,23 @@
docker_kill_wait ${BUILD_TAG}-bts
}
+show_respawn_count() {
+ local count=$(grep -P 'respawn: \d*: starting: ' "$VOL_BASE_DIR"/bts/osmo-bts.log | wc -l)
+ # Currently we run generic/bts/oml configurations, which means 3
+ # restarts are expected.
+ local count_exp=3
+
+ if [ "$count" = "$count_exp" ]; then
+ return
+ fi
+
+ echo
+ echo "================================================================"
+ echo " WARNING: osmo-bts was respawned $count times (expected: $count_exp)! (OS#6794)"
+ echo "================================================================"
+ echo
+}
+
network_create
mkdir $VOL_BASE_DIR/bts-tester-generic
@@ -272,3 +289,4 @@
start_config_virtphy
start_config_oml
start_config_hopping
+show_respawn_count
To view, visit change 40784. To unsubscribe, or for help writing mail filters, visit settings.