Change in osmo-gsm-tester[master]: Introduce contrib/jenkins-build-amarisoft.sh

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
Fri Apr 3 14:16:21 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17710 )

Change subject: Introduce contrib/jenkins-build-amarisoft.sh
......................................................................

Introduce contrib/jenkins-build-amarisoft.sh

Prepares inst tgz archives to be consumed by osmo-gsm-tester from
Amarisoft prebuilt binaries.

Change-Id: I372606fc5ff9f6bb3ef848f2fe229b83382ddc09
---
A contrib/jenkins-build-amarisoft.sh
M src/osmo_gsm_tester/amarisoft_enb.py
M src/osmo_gsm_tester/amarisoft_epc.py
3 files changed, 75 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/contrib/jenkins-build-amarisoft.sh b/contrib/jenkins-build-amarisoft.sh
new file mode 100755
index 0000000..ee26f45
--- /dev/null
+++ b/contrib/jenkins-build-amarisoft.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+set -e -x
+
+amarisoft_tgz="$1"
+
+if [ ! -f "$amarisoft_tgz" ]; then
+        echo "Amarisoft tgz doesn't exist: $amarisoft_tgz"
+        exit 1
+fi
+
+base="$PWD"
+name="srslte"
+git_url="${git_url:-https://github.com/srsLTE}"
+project_name_srslte="${project_name:-srsLTE}"
+. "$(dirname "$0")/jenkins-build-common.sh"
+
+#TODO: make sure libconfig, zeroMQ is installed
+build_repo $project_name_srslte
+
+git_url="git at github.com:softwareradiosystems"
+project_name_zmq="amarisoft_dummy_trx"
+branch="trx_zmq"
+have_repo $project_name_zmq $branch
+cd $project_name_zmq
+rm -rf build && mkdir build && cd build || exit 1
+cmake -DSRSLTE_BUILD_PATH=${base}/${project_name_srslte}/build ../
+make -j8
+cd $base
+
+rm -rf inst-tmp && mkdir inst-tmp
+rm -rf inst-tmp-uhd && mkdir inst-tmp-uhd
+tar -zxf $amarisoft_tgz -C inst-tmp/
+tar -zxf inst-tmp/*/trx_uhd*.tar.gz -C inst-tmp/
+#tar -zxf inst-tmp/trx_uhd-linux*/trx_uhd.so.tar.gz -C inst-tmp-uhd/
+
+# Build trx_uhd.so:
+cd ${base}/inst-tmp/trx_uhd-linux*/
+make
+cd ${base}
+
+# Create amarisoftenb inst:
+rm -rf inst-amarisoftenb && mkdir inst-amarisoftenb || exit 1
+tar --strip-components=1 -zxf inst-tmp/*/lteenb-linux*.tar.gz -C inst-amarisoftenb/
+cp ${base}/${project_name_srslte}/build/lib/src/phy/rf/libsrslte_rf.so inst-amarisoftenb/
+cp ${base}/${project_name_zmq}/build/libtrx_zmq-linux-2018-10-18.so inst-amarisoftenb/trx_zmq.so
+cp ${base}/inst-tmp/trx_uhd-linux*/trx_uhd.so inst-amarisoftenb/
+this="amarisoftenb.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}"
+tar="${this}.tgz"
+tar -czf "$tar" -C inst-amarisoftenb/ .
+md5sum "$tar" > "${this}.md5"
+
+# Create amarisoftue inst:
+rm -rf inst-amarisoftue && mkdir inst-amarisoftue || exit 1
+tar --strip-components=1 -zxf inst-tmp/*/lteue-linux*.tar.gz -C inst-amarisoftue/
+cp ${base}/${project_name_srslte}/build/lib/src/phy/rf/libsrslte_rf.so inst-amarisoftue/
+cp ${base}/${project_name_zmq}/build/libtrx_zmq-linux-2018-10-18.so inst-amarisoftue/trx_zmq.so
+cp ${base}/inst-tmp/trx_uhd-linux*/trx_uhd.so inst-amarisoftenb/
+this="amarisoftue.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}"
+tar="${this}.tgz"
+tar -czf "$tar" -C inst-amarisoftue/ .
+md5sum "$tar" > "${this}.md5"
+
+# Create amarisoftepc inst:
+rm -rf inst-amarisoftepc && mkdir inst-amarisoftepc || exit 1
+tar --strip-components=1 -zxf inst-tmp/*/ltemme-linux*.tar.gz -C inst-amarisoftepc/
+this="amarisoftepc.build-${BUILD_NUMBER-$(date +%Y-%m-%d_%H_%M_%S)}"
+tar="${this}.tgz"
+tar -czf "$tar" -C inst-amarisoftepc/ .
+md5sum "$tar" > "${this}.md5"
diff --git a/src/osmo_gsm_tester/amarisoft_enb.py b/src/osmo_gsm_tester/amarisoft_enb.py
index 79b90a7..5b4e99e 100644
--- a/src/osmo_gsm_tester/amarisoft_enb.py
+++ b/src/osmo_gsm_tester/amarisoft_enb.py
@@ -82,7 +82,9 @@
 
     def bin_prefix(self):
         if self._bin_prefix is None:
-            self._bin_prefix = os.getenv('AMARISOFT_PATH_ENB', AmarisoftENB.REMOTE_DIR)
+            self._bin_prefix = os.getenv('AMARISOFT_PATH_ENB', None)
+            if self._bin_prefix == None:
+                self._bin_prefix  = self.suite_run.trial.get_inst('amarisoftenb')
         return self._bin_prefix
 
     def cleanup(self):
diff --git a/src/osmo_gsm_tester/amarisoft_epc.py b/src/osmo_gsm_tester/amarisoft_epc.py
index eb9be94..c1f341c 100644
--- a/src/osmo_gsm_tester/amarisoft_epc.py
+++ b/src/osmo_gsm_tester/amarisoft_epc.py
@@ -56,7 +56,9 @@
 
     def bin_prefix(self):
         if self._bin_prefix is None:
-            self._bin_prefix = os.getenv('AMARISOFT_PATH_EPC', AmarisoftEPC.REMOTE_DIR)
+            self._bin_prefix = os.getenv('AMARISOFT_PATH_EPC', None)
+            if self._bin_prefix == None:
+                self._bin_prefix  = self.suite_run.trial.get_inst('amarisoftepc')
         return self._bin_prefix
 
     def cleanup(self):

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/17710
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I372606fc5ff9f6bb3ef848f2fe229b83382ddc09
Gerrit-Change-Number: 17710
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200403/04eff674/attachment.htm>


More information about the gerrit-log mailing list