Change in docker-playground[master]: Add script to bisect test failures with ttcn3 and docker

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Apr 28 15:06:08 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13790 )

Change subject: Add script to bisect test failures with ttcn3 and docker
......................................................................

Add script to bisect test failures with ttcn3 and docker

With this script you can now use docker ttcn3 test results to bisect a
regression and find the offending commit.

Use like this from the osmo-* git repository:
$ git bisect start <bad-rev> <good-rev>
$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh <component-to-test> <testcase>
e.g.:
$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc BSC_Tests.TC_ho_in_fail_no_detect

Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
---
A osmo-bisect.sh
1 file changed, 53 insertions(+), 0 deletions(-)

Approvals:
  Daniel Willmann: Verified
  lynxis lazus: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/osmo-bisect.sh b/osmo-bisect.sh
new file mode 100755
index 0000000..5ca69cd
--- /dev/null
+++ b/osmo-bisect.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# Script to bisect an osmo-* project with the docker ttcn3 images
+# You need the git checkout of the project you wand to test as well as a
+# checkout of the docker-playground repository.
+
+# Use like this from the osmo-* project repository where the regression
+# occurs:
+# $ git bisect start <bad-rev> <good-rev>
+# $ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh <component-to-test> <testcase>
+# e.g.:
+# $ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc BSC_Tests.TC_ho_in_fail_no_detect
+
+
+DOCKER_PLAYGROUND=$(dirname "$0")
+COMP_UPPER=$(echo "$1" | tr '[:lower:]' '[:upper:]')
+COMP_LOWER=$(echo "$1" | tr '[:upper:]' '[:lower:]')
+TESTCASE=$2
+
+COMMIT=$(git log -1 --format=format:%H)
+
+case $COMP_LOWER in
+	"hnbgw")
+		BRANCH="OSMO_IUH_BRANCH"
+		SUITE="ttcn3-hnbgw-test"
+		;;
+	"bsc"|\
+	"bts"|\
+	"ggsn"|\
+	"hlr"|\
+	"mgw"|\
+	"msc"|\
+	"nitb"|\
+	"pcu"|\
+	"sgsn"|\
+	"sip"|\
+	"stp")
+		BRANCH="OSMO_${COMP_UPPER}_BRANCH"
+		SUITE="ttcn3-${COMP_LOWER}-test"
+		;;
+	*)
+		echo "Unknown repo, please fix the script!"
+		exit 125
+		;;
+esac
+
+export "$BRANCH=$COMMIT"
+
+cd "$DOCKER_PLAYGROUND/$SUITE" || exit 125
+
+echo "Testing for $COMMIT"
+./jenkins.sh | grep -- "====== $TESTCASE pass ======"
+exit $?

-- 
To view, visit https://gerrit.osmocom.org/13790
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f
Gerrit-Change-Number: 13790
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190428/13bafec2/attachment.htm>


More information about the gerrit-log mailing list