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/.
Max gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/3008
to look at the new patch set (#5).
Simplify jenkins build scripts
* move duplicated code into separate functions in jenkins_common.sh
* use that function in individual builds
Change-Id: I4d09c5f2693b5ac0a4d8f2c840971e13d1ec58cf
---
M contrib/jenkins_bts_trx.sh
M contrib/jenkins_common.sh
M contrib/jenkins_lc15.sh
M contrib/jenkins_oct.sh
M contrib/jenkins_oct_and_bts_trx.sh
M contrib/jenkins_sysmobts.sh
6 files changed, 36 insertions(+), 86 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/3008/5
diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh
index 076a4ff..559b53a 100755
--- a/contrib/jenkins_bts_trx.sh
+++ b/contrib/jenkins_bts_trx.sh
@@ -15,26 +15,9 @@
# Get osmo-pcu for pcuif_proto.h
osmo-deps.sh osmo-pcu
-cd "$base"
-
-set +x
-echo
-echo
-echo
-echo " =============================== osmo-bts-trx ==============================="
-echo
-set -x
-
-autoreconf --install --force
configure_flags="\
- --with-openbsc=$deps/openbsc/openbsc/include \
--with-osmo-pcu=$deps/osmo-pcu/include \
--enable-trx \
"
-./configure $configure_flags
-$MAKE $PARALLEL_MAKE
-$MAKE check \
- || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="$configure_flags" \
- $MAKE distcheck \
- || cat-testlogs.sh
+
+build_bts "osmo-bts-trx" "$deps" "$base" "$configure_flags"
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
index 824dd43..ee3ed17 100644
--- a/contrib/jenkins_common.sh
+++ b/contrib/jenkins_common.sh
@@ -16,9 +16,32 @@
# Get libosmocore for verify_value_string_arrays_are_terminated.py
osmo-deps.sh libosmocore
-# Get OpenBSC for gsm_data_shared.*
-osmo-deps.sh openbsc
-
cd "$base"
"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
+
+# generic project build function, usage:
+# build "PROJECT-NAME" "DEPENDENCIES_DIR_PATH" "BASE_DIR_PATH" "CONFIGURE OPTIONS"
+build_bts() {
+ set +x
+ echo
+ echo
+ echo
+ echo " =============================== $1 ==============================="
+ echo
+ set -x
+
+ shift
+ cd "$1"
+ osmo-deps.sh openbsc
+ conf_flags="--with-openbsc=$1/openbsc/openbsc/include"
+ shift
+ cd "$1"
+ shift
+ conf_flags="$conf_flags $*"
+ autoreconf --install --force
+ ./configure $conf_flags
+ $MAKE $PARALLEL_MAKE
+ $MAKE check || cat-testlogs.sh
+ DISTCHECK_CONFIGURE_FLAGS=$conf_flags $MAKE distcheck || cat-testlogs.sh
+}
diff --git a/contrib/jenkins_lc15.sh b/contrib/jenkins_lc15.sh
index af335d5..4a30e1c 100755
--- a/contrib/jenkins_lc15.sh
+++ b/contrib/jenkins_lc15.sh
@@ -12,18 +12,7 @@
cd "$deps"
osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
-cd "$base"
-set +x
-echo
-echo
-echo
-echo " =============================== osmo-bts-lc15 ==============================="
-echo
-set -x
+configure_flags="--with-litecell15=$deps/layer1-headers/inc/ --enable-litecell15"
-autoreconf --install --force
-./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-litecell15="$deps/layer1-headers/inc/" --enable-litecell15
-$MAKE $PARALLEL_MAKE
-$MAKE check || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="--with-litecell15=$deps/layer1-headers/inc/ --with-openbsc=$deps/openbsc/openbsc/include --enable-litecell15" $MAKE distcheck || cat-testlogs.sh
+build_bts "osmo-bts-lc15" "$deps" "$base" "$configure_flags"
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index 6ad5358..ffc448a 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -12,21 +12,7 @@
cd "$deps"
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
-cd "$base"
-set +x
-echo
-echo
-echo
-echo " =============================== osmo-bts-octphy ==============================="
-echo
-set -x
+configure_flags="--with-octsdr-2g=$deps/layer1-headers/ --enable-octphy"
-autoreconf --install --force
-./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/layer1-headers/" --enable-octphy
-$MAKE $PARALLEL_MAKE
-$MAKE check \
- || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-headers/ --with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \
- $MAKE distcheck \
- || cat-testlogs.sh
+build_bts "osmo-bts-octphy" "$deps" "$base" "$configure_flags"
diff --git a/contrib/jenkins_oct_and_bts_trx.sh b/contrib/jenkins_oct_and_bts_trx.sh
index a8a8004..942400e 100755
--- a/contrib/jenkins_oct_and_bts_trx.sh
+++ b/contrib/jenkins_oct_and_bts_trx.sh
@@ -17,28 +17,11 @@
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
-cd "$base"
-
-set +x
-echo
-echo
-echo
-echo " =============================== osmo-bts-octphy+trx ==============================="
-echo
-set -x
-
-autoreconf --install --force
configure_flags="\
- --with-openbsc=$deps/openbsc/openbsc/include \
--with-osmo-pcu=$deps/osmo-pcu/include \
--with-octsdr-2g=$deps/layer1-headers/ \
--enable-octphy \
--enable-trx \
"
-./configure $configure_flags
-$MAKE $PARALLEL_MAKE
-$MAKE check \
- || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="$configure_flags" \
- $MAKE distcheck \
- || cat-testlogs.sh
+
+build_bts "osmo-bts-octphy+trx" "$deps" "$base" "$configure_flags"
diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh
index 227f249..8bbfc70 100755
--- a/contrib/jenkins_sysmobts.sh
+++ b/contrib/jenkins_sysmobts.sh
@@ -14,24 +14,10 @@
osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
mkdir -p "$inst/include/sysmocom/femtobts"
ln -s $deps/layer1-headers/include/* "$inst/include/sysmocom/femtobts/"
-cd "$base"
-set +x
-echo
-echo
-echo
-echo " =============================== osmo-bts-sysmo ==============================="
-echo
-set -x
+configure_flags="--enable-sysmocom-bts"
-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
+build_bts "osmo-bts-sysmo" "$deps" "$base" "$configure_flags"
# This will not work for the femtobts
if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then
--
To view, visit https://gerrit.osmocom.org/3008
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4d09c5f2693b5ac0a4d8f2c840971e13d1ec58cf
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>