Review at https://gerrit.osmocom.org/2894
Move common steps into common jenkins helper Move value_string termination check and OpenBSC/OsmoPCU headers checkout into shared jenkins helper from BTS' model-specific helpers to get rid of copy-pasted code. Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408 --- M contrib/jenkins_bts_model.sh M contrib/jenkins_bts_trx.sh M contrib/jenkins_oct.sh M contrib/jenkins_oct_and_bts_trx.sh M contrib/jenkins_sysmobts.sh 5 files changed, 17 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/94/2894/1 diff --git a/contrib/jenkins_bts_model.sh b/contrib/jenkins_bts_model.sh index 58eac5b..bcb2d06 100755 --- a/contrib/jenkins_bts_model.sh +++ b/contrib/jenkins_bts_model.sh @@ -1,5 +1,7 @@ #!/bin/sh bts_model="$1" +base="$PWD" +deps="$base/deps" if [ ! -d "./contrib" ]; then echo "Run ./contrib/jenkins_bts_model.sh from the root of the osmo-bts tree" @@ -8,6 +10,21 @@ set -x -e +cd "$deps" + +# Get OsmoPCU for pcuif_proto.h +osmo-deps.sh osmo-pcu + +# Get OpenBSC for gsm_data_shared.* +osmo-deps.sh openbsc + +# Get libosmocore for verify_value_string_arrays_are_terminated.py +osmo-deps.sh libosmocore + +cd "$base" + +"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") + case "$bts_model" in sysmo) diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh index dbd41ca..512a29b 100755 --- a/contrib/jenkins_bts_trx.sh +++ b/contrib/jenkins_bts_trx.sh @@ -15,19 +15,7 @@ osmo-build-dep.sh libosmocore -"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") - osmo-build-dep.sh libosmo-abis - -cd "$deps" - -# Get osmo-pcu for pcuif_proto.h -osmo-deps.sh osmo-pcu - -# Get openbsc for gsm_data_shared.* -osmo-deps.sh openbsc - -cd "$base" set +x echo diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 9f06888..df26b14 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -10,16 +10,7 @@ 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 - -"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" diff --git a/contrib/jenkins_oct_and_bts_trx.sh b/contrib/jenkins_oct_and_bts_trx.sh index 93aa47a..f546530 100755 --- a/contrib/jenkins_oct_and_bts_trx.sh +++ b/contrib/jenkins_oct_and_bts_trx.sh @@ -15,17 +15,7 @@ osmo-build-dep.sh libosmocore -"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") - osmo-build-dep.sh libosmo-abis - -cd "$deps" - -# Get osmo-pcu for pcuif_proto.h -osmo-deps.sh osmo-pcu - -# Get openbsc for gsm_data_shared.* -osmo-deps.sh openbsc cd "$deps" if ! test -d layer1-api; diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh index c6f109d..0f51aff 100755 --- a/contrib/jenkins_sysmobts.sh +++ b/contrib/jenkins_sysmobts.sh @@ -10,16 +10,7 @@ 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 - -"$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]") export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" -- To view, visit https://gerrit.osmocom.org/2894 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic48b1f75179b9008d65219dd5a47c1ab3b886408 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max <msur...@sysmocom.de>