laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/19623 )

Change subject: ttcn3-bts-test/jenkins.sh: use 
bts-tester-{generic,oml,virtphy,hopping}
......................................................................

ttcn3-bts-test/jenkins.sh: use bts-tester-{generic,oml,virtphy,hopping}

Let's use separate directories to store the artifacts of different
TTCN-3 test case groups.  This would prevent the test suite from
overwriting *.log and *.pcap files when running both generic and
hopping configurations together, and simplify the overall hierarchy.

Change-Id: I7c41cfb395047433e22e9c65c8c00ae284717b32
Related: SYS#4868, OS#4546
---
M ttcn3-bts-test/jenkins.sh
1 file changed, 16 insertions(+), 12 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Verified



diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index cd6fc38..544825c 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -90,11 +90,12 @@

 start_testsuite() {
        echo Starting container with BTS testsuite
+       variant=$1 # e.g 'generic', 'oml', 'hopping'
        docker run      --rm \
                        --network $NET_NAME --ip 172.18.9.10 \
                        --ulimit core=-1 \
                        -e "TTCN3_PCAP_PATH=/data" \
-                       -v $VOL_BASE_DIR/bts-tester:/data \
+                       -v $VOL_BASE_DIR/bts-tester-${variant}:/data \
                        -v $VOL_BASE_DIR/unix:/data/unix \
                        --name ${BUILD_TAG}-ttcn3-bts-test \
                        $DOCKER_ARGS \
@@ -103,14 +104,20 @@

 network_create 9

-mkdir $VOL_BASE_DIR/bts-tester
-cp BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/
+mkdir $VOL_BASE_DIR/bts-tester-generic
+cp BTS_Tests.cfg $VOL_BASE_DIR/bts-tester-generic/
+mkdir $VOL_BASE_DIR/bts-tester-virtphy
+cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester-virtphy/
+mkdir $VOL_BASE_DIR/bts-tester-oml
+cp oml/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester-oml/
+mkdir $VOL_BASE_DIR/bts-tester-hopping
+cp fh/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester-hopping/

 # Work around for a bug in osmo-bts when all transceivers use 
IPAC_PROTO_RSL_TRX0.
 # Enables patching of IPA stream ID. TODO: remove as soon as we make a new 
release.
 if [ "$IMAGE_SUFFIX" = "latest" ]; then
        sed "s/RSL_Emulation.mp_rslem_patch_ipa_cid := 
false/RSL_Emulation.mp_rslem_patch_ipa_cid := true/g" -i \
-               "$VOL_BASE_DIR/bts-tester/BTS_Tests.cfg"
+               "$VOL_BASE_DIR/bts-tester-generic/BTS_Tests.cfg"
 fi

 mkdir $VOL_BASE_DIR/bsc
@@ -131,7 +138,7 @@
 start_bts trx 0
 start_fake_trx
 start_trxcon
-start_testsuite
+start_testsuite generic

 # 2) some GPRS tests require virt_phy
 echo "Changing to virtphy configuration"
@@ -143,8 +150,7 @@
 start_bts virtual 0
 start_virtphy
 # ... and execute the testsuite again with different cfg
-cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/
-#start_testsuite
+#start_testsuite virtphy

 # 3) OML tests require us to run without BSC
 docker container kill ${BUILD_TAG}-bsc
@@ -156,21 +162,19 @@
 start_fake_trx
 start_trxcon
 # ... and execute the testsuite again with different cfg
-cp oml/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/
-start_testsuite
+start_testsuite oml

 # 4) Frequency hopping tests require different configuration files
-cp fh/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/
 cp fh/osmo-bsc.cfg $VOL_BASE_DIR/bsc/
 cp osmo-bts.cfg $VOL_BASE_DIR/bts/
 # restart the BSC/BTS and run the testsuite again
 docker container kill ${BUILD_TAG}-bts
 start_bsc
 start_bts trx 0
-start_testsuite
+start_testsuite hopping
 # rename the test results, so they appear as 'BTS_Tests:hopping' in Jenkins
 sed -i "s#classname='BTS_Tests'#classname='BTS_Tests:hopping'#g" \
-       $VOL_BASE_DIR/bts-tester/junit-xml-hopping-*.log
+       $VOL_BASE_DIR/bts-tester-hopping/junit-xml-hopping-*.log

 echo Stopping containers
 docker container kill ${BUILD_TAG}-trxcon

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/19623
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I7c41cfb395047433e22e9c65c8c00ae284717b32
Gerrit-Change-Number: 19623
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to