osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-dev/+/36768?usp=email )


Change subject: ttcn3.sh: add -c CONFIG argument
......................................................................

ttcn3.sh: add -c CONFIG argument

Allow only running one of the ttcn3-bts-test configurations, instead of
running all of them.

Depends: docker-playground I1dce5e6aa4b5d67f9f8c96ced611ab2875c353c8
Change-Id: I46028824847ffc2d0768d32c138ccd32a6c8c769
---
M ttcn3/ttcn3.sh
1 file changed, 23 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/68/36768/1

diff --git a/ttcn3/ttcn3.sh b/ttcn3/ttcn3.sh
index a458f5b..7cdf4c1 100755
--- a/ttcn3/ttcn3.sh
+++ b/ttcn3/ttcn3.sh
@@ -10,6 +10,7 @@
 KERNEL_DIR=""
 KERNEL_SKIP_MARKER="$DIR_MAKE/.kernel_built_from_source"
 ARG_TEST_NAME=""
+ARG_TEST_CONFIGS=""
 DOCKER_IMG_TITAN="debian-bookworm-titan"

 clean() {
@@ -43,11 +44,14 @@
 }

 parse_args() {
-       while getopts 'ht:dkf' OPTION; do
+       while getopts 'ht:c:dkf' OPTION; do
                case "$OPTION" in
                t)
                        ARG_TEST_NAME="$OPTARG"
                        ;;
+               c)
+                       ARG_TEST_CONFIGS="$OPTARG"
+                       ;;
                d)
                        if [ -n "$KERNEL_TEST" ]; then
                                echo "ERROR: use either -d or -k"
@@ -81,12 +85,13 @@
                        ;;
                h|*)
                        local name="$(basename $0)"
-                       echo "usage: $name [-h] [-t TESTNAME] [-d|-k [-f]] 
PROJECT"
+                       echo "usage: $name [-h] [-t TESTNAME] [-c CONFIG] 
[-d|-k [-f]] PROJECT"
                        echo "   or: $name clean"
                        echo
                        echo "arguments:"
                        echo "  -h       show help"
                        echo "  -t       only run the test with this name"
+                       echo "  -c       only run test configuration with this 
name"
                        echo
                        echo "arguments for kernel tests:"
                        echo "  -d       run kernel tests with debian kernel"
@@ -106,6 +111,7 @@
                        echo "  $name hss"
                        echo "  $name mme"
                        echo "  $name pgw"
+                       echo "  $name -t TC_est_dchan -c generic bts"
                        exit 1
                        ;;
                esac
@@ -482,8 +488,10 @@
        if [ -n "$ARG_TEST_NAME" ]; then
                DOCKER_ARGS="$DOCKER_ARGS -e TEST_NAME=$ARG_TEST_NAME"
        fi
+
        export DOCKER_ARGS
        export NO_LIST_OSMO_PACKAGES=1
+       export TEST_CONFIGS="$ARG_TEST_CONFIGS"
        ./jenkins.sh

        touch "$marker"

--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/36768?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I46028824847ffc2d0768d32c138ccd32a6c8c769
Gerrit-Change-Number: 36768
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-MessageType: newchange

Reply via email to