<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/13790">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Daniel Willmann: Verified
  lynxis lazus: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add script to bisect test failures with ttcn3 and docker<br><br>With this script you can now use docker ttcn3 test results to bisect a<br>regression and find the offending commit.<br><br>Use like this from the osmo-* git repository:<br>$ git bisect start <bad-rev> <good-rev><br>$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh <component-to-test> <testcase><br>e.g.:<br>$ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc BSC_Tests.TC_ho_in_fail_no_detect<br><br>Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f<br>---<br>A osmo-bisect.sh<br>1 file changed, 53 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/osmo-bisect.sh b/osmo-bisect.sh</span><br><span>new file mode 100755</span><br><span>index 0000000..5ca69cd</span><br><span>--- /dev/null</span><br><span>+++ b/osmo-bisect.sh</span><br><span>@@ -0,0 +1,53 @@</span><br><span style="color: hsl(120, 100%, 40%);">+#!/bin/sh</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Script to bisect an osmo-* project with the docker ttcn3 images</span><br><span style="color: hsl(120, 100%, 40%);">+# You need the git checkout of the project you wand to test as well as a</span><br><span style="color: hsl(120, 100%, 40%);">+# checkout of the docker-playground repository.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Use like this from the osmo-* project repository where the regression</span><br><span style="color: hsl(120, 100%, 40%);">+# occurs:</span><br><span style="color: hsl(120, 100%, 40%);">+# $ git bisect start <bad-rev> <good-rev></span><br><span style="color: hsl(120, 100%, 40%);">+# $ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh <component-to-test> <testcase></span><br><span style="color: hsl(120, 100%, 40%);">+# e.g.:</span><br><span style="color: hsl(120, 100%, 40%);">+# $ git bisect run ~/scm/osmo/docker-playground/osmo-bisect.sh bsc BSC_Tests.TC_ho_in_fail_no_detect</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+DOCKER_PLAYGROUND=$(dirname "$0")</span><br><span style="color: hsl(120, 100%, 40%);">+COMP_UPPER=$(echo "$1" | tr '[:lower:]' '[:upper:]')</span><br><span style="color: hsl(120, 100%, 40%);">+COMP_LOWER=$(echo "$1" | tr '[:upper:]' '[:lower:]')</span><br><span style="color: hsl(120, 100%, 40%);">+TESTCASE=$2</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+COMMIT=$(git log -1 --format=format:%H)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+case $COMP_LOWER in</span><br><span style="color: hsl(120, 100%, 40%);">+  "hnbgw")</span><br><span style="color: hsl(120, 100%, 40%);">+            BRANCH="OSMO_IUH_BRANCH"</span><br><span style="color: hsl(120, 100%, 40%);">+            SUITE="ttcn3-hnbgw-test"</span><br><span style="color: hsl(120, 100%, 40%);">+            ;;</span><br><span style="color: hsl(120, 100%, 40%);">+    "bsc"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "bts"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "ggsn"|\</span><br><span style="color: hsl(120, 100%, 40%);">+    "hlr"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "mgw"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "msc"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "nitb"|\</span><br><span style="color: hsl(120, 100%, 40%);">+    "pcu"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "sgsn"|\</span><br><span style="color: hsl(120, 100%, 40%);">+    "sip"|\</span><br><span style="color: hsl(120, 100%, 40%);">+     "stp")</span><br><span style="color: hsl(120, 100%, 40%);">+              BRANCH="OSMO_${COMP_UPPER}_BRANCH"</span><br><span style="color: hsl(120, 100%, 40%);">+          SUITE="ttcn3-${COMP_LOWER}-test"</span><br><span style="color: hsl(120, 100%, 40%);">+            ;;</span><br><span style="color: hsl(120, 100%, 40%);">+    *)</span><br><span style="color: hsl(120, 100%, 40%);">+            echo "Unknown repo, please fix the script!"</span><br><span style="color: hsl(120, 100%, 40%);">+         exit 125</span><br><span style="color: hsl(120, 100%, 40%);">+              ;;</span><br><span style="color: hsl(120, 100%, 40%);">+esac</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+export "$BRANCH=$COMMIT"</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+cd "$DOCKER_PLAYGROUND/$SUITE" || exit 125</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+echo "Testing for $COMMIT"</span><br><span style="color: hsl(120, 100%, 40%);">+./jenkins.sh | grep -- "====== $TESTCASE pass ======"</span><br><span style="color: hsl(120, 100%, 40%);">+exit $?</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13790">change 13790</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13790"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: docker-playground </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I11f7e61a9b30d58a0fdfcaf77dde447806bf661f </div>
<div style="display:none"> Gerrit-Change-Number: 13790 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Daniel Willmann <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Daniel Willmann <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>