aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-07 01:12:38 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-12 11:29:05 +0000
commitc09e5a44c3c1c2882339fe8822f373b1e12839ae (patch)
tree31607361c6b1ef8c8665c9a3f646177ed26fa052
parent93f3102da9c112708808a21a9889166240a6f6dd (diff)
jenkins.sh: use osmo-build-dep.sh, log test failures
Like in libosmo-abis' and other jenkins.sh Change-Id: I6ad88bce18677b148af63ae8f6e0ab7e3b38b5a2
-rwxr-xr-xcontrib/jenkins_oct.sh54
-rwxr-xr-xcontrib/jenkins_sysmobts.sh61
2 files changed, 63 insertions, 52 deletions
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 32b14073..79202241 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 @@ else
git reset --hard $FIRMWARE_VERSION
fi
+cd "$base"
+
+set +x
+echo
+echo
+echo
+echo " =============================== osmo-bts-octphy ==============================="
+echo
+set -x
-# Build osmo-bts
-cd ../../
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 051c8e0c..be544a78 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 ../
-
-osmo-deps.sh libosmocore
-cd libosmocore
-autoreconf --install --force
-./configure --prefix=$PWD/../install
-$MAKE $PARALLEL_MAKE install
+export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
+export LD_LIBRARY_PATH="$inst/lib"
-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
+osmo-build-dep.sh libosmo-abis
-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 @@ git reset --hard origin/master
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 ../../
-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
+set +x
+echo
+echo
+echo
+echo " =============================== osmo-bts-sysmo ==============================="
+echo
+set -x
+autoreconf --install --force
+./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