Change in docker-playground[master]: osmo-gsm-tester: Pass conf dir through -c cmd line arg instead of env...

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu May 7 16:49:47 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/18104 )


Change subject: osmo-gsm-tester: Pass conf dir through -c cmd line arg instead of env var
......................................................................

osmo-gsm-tester: Pass conf dir through -c cmd line arg instead of env var

As of osmo-gsm-tester.git Change-Id
I7eb69f870d0dcb5906d45ae067d6bed1aabf5862, the enviornment variable
OSMO_GSM_TESTER_CONF is deprecated in favour of already existing -c cmd
line argument. Let's use it while still providing the docker setup with
a way (using same env var name) to modify where the conf dir is to be
found inside the docker container (for instance, to provide an external
conf dir).

Change-Id: I54ea9dc4d0bb205debf312f5a37053bc60cfcdb7
---
M osmo-gsm-tester/Dockerfile
M osmo-gsm-tester/jenkins.sh
M osmo-gsm-tester/osmo-gsm-tester-master.sh
3 files changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/04/18104/1

diff --git a/osmo-gsm-tester/Dockerfile b/osmo-gsm-tester/Dockerfile
index b46fe4c..0473f96 100644
--- a/osmo-gsm-tester/Dockerfile
+++ b/osmo-gsm-tester/Dockerfile
@@ -132,8 +132,6 @@
 VOLUME	/data
 COPY	resources.conf /tmp/osmo-gsm-tester/sysmocom/resources.conf
 
-ENV   OSMO_GSM_TESTER_CONF /tmp/osmo-gsm-tester/sysmocom
-
 WORKDIR	/data
 CMD	["/bin/sh", "-c", "/data/osmo-gsm-tester-master.sh >/data/osmo-gsm-tester.log 2>&1"]
 
diff --git a/osmo-gsm-tester/jenkins.sh b/osmo-gsm-tester/jenkins.sh
index 71ab0f4..89f7116 100755
--- a/osmo-gsm-tester/jenkins.sh
+++ b/osmo-gsm-tester/jenkins.sh
@@ -80,6 +80,7 @@
 		/bin/sh -c "/data/osmo-gsm-tester-slave.sh >/data/sshd.log 2>&1"
 
 echo Starting container with osmo-gsm-tester main unit
+OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF:-/tmp/osmo-gsm-tester/sysmocom}
 OSMO_GSM_TESTER_OPTS=${OSMO_GSM_TESTER_OPTS:--T -l dbg -s 4g:srsenb-rftype at zmq+srsue-rftype@zmq -t ping}
 docker run	--rm \
 		--cap-add=NET_ADMIN \
@@ -90,6 +91,7 @@
 		--ip 172.18.50.2 \
 		-v $VOL_BASE_DIR/ogt-master:/data \
 		-v "${TRIAL_DIR}:/tmp/trial" \
+		-e "OSMO_GSM_TESTER_CONF=${OSMO_GSM_TESTER_CONF}" \
 		-e "OSMO_GSM_TESTER_OPTS=${OSMO_GSM_TESTER_OPTS}" \
 		-e "SRS_LTE_REPO_NAME=${SRS_LTE_REPO_NAME}" \
 		-e "HOST_USER_ID=$(id -u)" \
diff --git a/osmo-gsm-tester/osmo-gsm-tester-master.sh b/osmo-gsm-tester/osmo-gsm-tester-master.sh
index 059fae7..4a32376 100755
--- a/osmo-gsm-tester/osmo-gsm-tester-master.sh
+++ b/osmo-gsm-tester/osmo-gsm-tester-master.sh
@@ -43,7 +43,7 @@
 chown -R jenkins /tmp/trial/
 
 rc=0
-su -c "python3 -u /tmp/osmo-gsm-tester/src/osmo-gsm-tester.py /tmp/trial $OSMO_GSM_TESTER_OPTS" -m jenkins || rc=$?
+su -c "python3 -u /tmp/osmo-gsm-tester/src/osmo-gsm-tester.py -c \"$OSMO_GSM_TESTER_CONF\" /tmp/trial $OSMO_GSM_TESTER_OPTS" -m jenkins || rc=$?
 
 # Make trial dir again owned by user running the container:
 chown -R "${HOST_USER_ID}:${HOST_GROUP_ID}" /tmp/trial/

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I54ea9dc4d0bb205debf312f5a37053bc60cfcdb7
Gerrit-Change-Number: 18104
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200507/d3cd22f9/attachment.htm>


More information about the gerrit-log mailing list