[MERGED] osmo-bts[master]: jenkins.sh: use osmo-build-dep.sh, log test failures

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

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Oct 12 11:29:05 UTC 2016


Neels Hofmeyr has submitted this change and it was merged.

Change subject: jenkins.sh: use osmo-build-dep.sh, log test failures
......................................................................


jenkins.sh: use osmo-build-dep.sh, log test failures

Like in libosmo-abis' and other jenkins.sh

Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2
---
M contrib/jenkins_oct.sh
M contrib/jenkins_sysmobts.sh
2 files changed, 63 insertions(+), 52 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 32b1407..7920224 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -2,33 +2,29 @@
 
 set -ex
 
-rm -rf deps/install
-mkdir deps || true
-cd deps
+base="$PWD"
+deps="$base/deps"
+inst="$deps/install"
+export deps inst
+
+mkdir "$deps" || true
+rm -rf "$inst"
 
 # Get the headers..
+cd "$deps"
 git clone git://git.osmocom.org/openbsc || true
 cd openbsc
 git pull --rebase
+cd "$base"
 
+osmo-build-dep.sh libosmocore
 
-# Build the dependency
-cd ../
+export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+export LD_LIBRARY_PATH="$inst/lib"
 
-osmo-deps.sh libosmocore
-cd libosmocore
-autoreconf --install --force
-./configure --prefix=$PWD/../install
-$MAKE $PARALLEL_MAKE install
+osmo-build-dep.sh libosmo-abis
 
-cd ../
-osmo-deps.sh libosmo-abis
-cd libosmo-abis
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
-
-cd ../
+cd "$deps"
 if ! test -d layer1-api;
 then
   git clone git://git.osmocom.org/octphy-2g-headers layer1-api
@@ -43,11 +39,21 @@
 git reset --hard $FIRMWARE_VERSION
 fi
 
+cd "$base"
 
-# Build osmo-bts
-cd ../../
+set +x
+echo
+echo
+echo
+echo " =============================== osmo-bts-octphy ==============================="
+echo
+set -x
+
 autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --with-openbsc=$PWD/deps/openbsc/openbsc/include --with-octsdr-2g=$PWD/deps/layer1-api/ --enable-octphy
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check
-DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$PWD/deps/layer1-api/ --with-openbsc=$PWD/deps/openbsc/openbsc/include --enable-octphy" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck
+./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/deps/layer1-api/" --enable-octphy
+$MAKE $PARALLEL_MAKE
+$MAKE check \
+  || cat-testlogs.sh
+DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-api/ --with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \
+  $MAKE distcheck \
+  || cat-testlogs.sh
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index 051c8e0..be544a7 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -2,33 +2,29 @@
 
 set -ex
 
-rm -rf deps/install
-mkdir deps || true
-cd deps
+base="$PWD"
+deps="$base/deps"
+inst="$deps/install"
+export deps inst
+
+mkdir "$deps" || true
+rm -rf "$inst"
 
 # Get the headers..
+cd "$deps"
 git clone git://git.osmocom.org/openbsc || true
 cd openbsc
 git pull --rebase
+cd "$base"
 
+osmo-build-dep.sh libosmocore
 
-# Build the dependency
-cd ../
+export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+export LD_LIBRARY_PATH="$inst/lib"
 
-osmo-deps.sh libosmocore
-cd libosmocore
-autoreconf --install --force
-./configure --prefix=$PWD/../install
-$MAKE $PARALLEL_MAKE install
+osmo-build-dep.sh libosmo-abis
 
-cd ../
-osmo-deps.sh libosmo-abis
-cd libosmo-abis
-autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig ./configure --prefix=$PWD/../install
-PKG_CONFIG_PATH=$PWD/../install/lib/pkgconfig $MAKE $PARALLEL_MAKE install
-
-cd ../
+cd "$deps"
 if ! test -d layer1-api;
 then
   git clone git://git.sysmocom.de/sysmo-bts/layer1-api.git layer1-api
@@ -42,20 +38,29 @@
 else
 git reset --hard $FIRMWARE_VERSION
 fi
-mkdir -p $PWD/../install/include/sysmocom/femtobts/
-cp include/*.h ../install/include/sysmocom/femtobts/
+mkdir -p "$inst/include/sysmocom/femtobts"
+cp include/*.h "$inst/include/sysmocom/femtobts/"
 
+cd "$base"
 
-# Build osmo-bts
-cd ../../
+set +x
+echo
+echo
+echo
+echo " =============================== osmo-bts-sysmo ==============================="
+echo
+set -x
+
 autoreconf --install --force
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig ./configure --enable-sysmocom-bts --with-openbsc=$PWD/deps/openbsc/openbsc/include
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE $PARALLEL_MAKE
-PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check
-DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$PWD/deps/openbsc/openbsc/include" PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck
-
+./configure --enable-sysmocom-bts --with-openbsc="$deps/openbsc/openbsc/include"
+$MAKE $PARALLEL_MAKE
+$MAKE check \
+  || cat-testlogs.sh
+DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$deps/openbsc/openbsc/include" \
+  $MAKE distcheck \
+  || cat-testlogs.sh
 
 # This will not work for the femtobts
 if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then
-  PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig $MAKE -C contrib/sysmobts-calib
+  $MAKE -C contrib/sysmobts-calib
 fi

-- 
To view, visit https://gerrit.osmocom.org/1024
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list