Introduce contrib/jenkins-build-amarisoft.sh
Prepares inst tgz archives to be consumed by osmo-gsm-tester from Amarisoft prebuilt binaries. Change-Id: I372606fc5ff9f6bb3ef848f2fe229b83382ddc09
This commit is contained in:
parent
76b2c2a108
commit
17253af1e9
|
@ -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@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"
|
|
@ -82,7 +82,9 @@ class AmarisoftENB(enb.eNodeB):
|
||||||
|
|
||||||
def bin_prefix(self):
|
def bin_prefix(self):
|
||||||
if self._bin_prefix is None:
|
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
|
return self._bin_prefix
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
|
|
|
@ -56,7 +56,9 @@ class AmarisoftEPC(epc.EPC):
|
||||||
|
|
||||||
def bin_prefix(self):
|
def bin_prefix(self):
|
||||||
if self._bin_prefix is None:
|
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
|
return self._bin_prefix
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
|
|
Loading…
Reference in New Issue