aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-03-12 21:00:55 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-03-12 21:37:33 +0100
commitc5e72f1492e4f2650bd5d16ce94dc38f025d66f7 (patch)
tree9f78b3b4dcdfbdcda7ba3e3ce6c713fb9bee791e
parent81a74ccae436eb78cec5742194d55a0797bd0f85 (diff)
Add configure flag to disable build of osmo-bscpespin/build
This way only ipaccess utils can be built without requiring osmo-bsc specific dependencies. Change-Id: I39783245a11aacaecf0873b3b74b60b559256f79
-rw-r--r--configure.ac18
-rwxr-xr-xcontrib/jenkins.sh50
-rw-r--r--src/osmo-bsc/Makefile.am4
-rw-r--r--tests/Makefile.am9
-rw-r--r--tests/atlocal.in1
-rw-r--r--tests/testsuite.at34
6 files changed, 91 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index cdee90c55..539d64d17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,15 +44,25 @@ AC_ARG_ENABLE([ipaccess-utils], [AS_HELP_STRING([--enable-ipaccess-utils], [Buil
AM_CONDITIONAL(BUILD_IPA_UTILS, test "x$osmo_ac_ipa_utils" = "xyes")
AC_SUBST(osmo_ac_ipa_utils)
+# Enable/disable osmo-bsc build?
+AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build osmo-bsc])],
+ [build_osmo_bsc="$enableval"],[build_osmo_bsc="yes"])
+AM_CONDITIONAL(BUILD_OSMO_BSC, test "x$build_osmo_bsc" = "xyes")
+AC_SUBST(build_osmo_bsc)
+
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.12.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.12.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 0.12.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.12.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.5.1)
-PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.3.0)
-PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.10.0)
-PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.10.0)
-PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.4.0)
+
+
+if test "x$build_osmo_bsc" = "xyes" ; then
+ PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.3.0)
+ PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.10.0)
+ PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.10.0)
+ PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.4.0)
+fi
dnl checks for header files
AC_HEADER_STDC
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index a47935f9b..e28882060 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -31,7 +31,36 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
export PATH="$inst/bin:$PATH"
+do_build() {
+ configure_flags="$1"
+ distcheck_flags="$2"
+ set +x
+ echo
+ echo
+ echo
+ echo " =============================== osmo-bsc ==============================="
+ echo
+ set -x
+
+ cd "$base"
+ autoreconf --install --force
+ ./configure $configure_flags
+ $MAKE $PARALLEL_MAKE
+ LD_LIBRARY_PATH="$inst/lib" $MAKE check \
+ || cat-testlogs.sh
+ LD_LIBRARY_PATH="$inst/lib" \
+ DISTCHECK_CONFIGURE_FLAGS="$distcheck_flags" \
+ $MAKE distcheck \
+ || cat-testlogs.sh
+ $MAKE maintainer-clean
+}
+
osmo-build-dep.sh libosmo-abis
+
+# To build ipaccess-utils we just need libosmocore and libosmo-abis:
+ipacess_utils_flags="--enable-sanitize --disable-external-tests --disable-vty-tests --disable-osmo-bsc --enable-ipaccess-utils --enable-werror $CONFIG"
+do_build "$ipacess_utils_flags" "$ipacess_utils_flags"
+
osmo-build-dep.sh libosmo-netif
osmo-build-dep.sh libosmo-sccp
osmo-build-dep.sh osmo-mgw
@@ -43,27 +72,10 @@ if [ "$WITH_MANUALS" = "1" ]; then
CONFIG="--enable-manuals"
fi
-set +x
-echo
-echo
-echo
-echo " =============================== osmo-bsc ==============================="
-echo
-set -x
-
-cd "$base"
-autoreconf --install --force
-./configure --enable-sanitize --enable-external-tests --enable-werror $CONFIG
-$MAKE $PARALLEL_MAKE
-LD_LIBRARY_PATH="$inst/lib" $MAKE check \
- || cat-testlogs.sh
-LD_LIBRARY_PATH="$inst/lib" \
- DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror $CONFIG" \
- $MAKE distcheck \
- || cat-testlogs.sh
-
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
make -C "$base/doc/manuals" publish
fi
+do_build "--enable-sanitize --enable-external-tests --enable-werror $CONFIG" "--enable-vty-tests --enable-external-tests --enable-werror $CONFIG"
+
osmo-clean-workspace.sh
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 0fabe51cf..eff8a6720 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -43,6 +43,8 @@ libbscbts_la_LIBADD = \
$(LIBOSMOABIS_LIBS) \
$(NULL)
+if BUILD_OSMO_BSC
+
bin_PROGRAMS = \
osmo-bsc \
$(NULL)
@@ -132,3 +134,5 @@ osmo_bsc_LDADD = \
$(LIBOSMOSIGTRAN_LIBS) \
$(LIBOSMOMGCPCLIENT_LIBS) \
$(NULL)
+
+endif # BUILD_OSMO_BSC
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 446276b3d..4efdafa9a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,12 +1,17 @@
SUBDIRS = \
+ abis \
+ nanobts_omlattr \
+ $(NULL)
+
+if BUILD_OSMO_BSC
+SUBDIRS += \
bsc \
codec_pref \
gsm0408 \
- abis \
subscr \
- nanobts_omlattr \
handover \
$(NULL)
+endif
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
diff --git a/tests/atlocal.in b/tests/atlocal.in
index e69de29bb..c76d9c8b5 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -0,0 +1 @@
+build_osmo_bsc='@build_osmo_bsc@'
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 1a190dda3..3f011419b 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -3,12 +3,14 @@ AT_BANNER([Regression tests.])
AT_SETUP([gsm0408])
AT_KEYWORDS([gsm0408])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/gsm0408/gsm0408_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/gsm0408/gsm0408_test], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([bsc_subscr])
AT_KEYWORDS([bsc_subscr])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/subscr/bsc_subscr_test.ok > expout
cat $abs_srcdir/subscr/bsc_subscr_test.err > experr
AT_CHECK([$abs_top_builddir/tests/subscr/bsc_subscr_test], [], [expout], [experr])
@@ -22,12 +24,14 @@ AT_CLEANUP
AT_SETUP([bsc])
AT_KEYWORDS([bsc])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/bsc/bsc_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/bsc/bsc_test], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([codec_pref])
AT_KEYWORDS([codec_pref])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/codec_pref/codec_pref_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/codec_pref/codec_pref_test], [], [expout], [ignore])
AT_CLEANUP
@@ -40,6 +44,7 @@ AT_CLEANUP
AT_SETUP([neighbor_ident])
AT_KEYWORDS([neighbor_ident])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/neighbor_ident_test.ok > expout
cat $abs_srcdir/handover/neighbor_ident_test.err > experr
AT_CHECK([$abs_top_builddir/tests/handover/neighbor_ident_test], [], [expout], [experr])
@@ -47,174 +52,203 @@ AT_CLEANUP
AT_SETUP([handover test 0])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 0], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 1])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 1], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 2])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 2], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 3])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 3], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 4])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 4], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 5])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 5], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 6])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 6], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 7])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 7], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 8])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 8], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 9])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 9], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 10])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 10], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 11])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 11], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 12])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 12], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 13])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 13], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 14])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 14], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 15])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 15], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 16])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 16], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 17])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 17], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 18])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 18], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 19])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 19], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 20])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 20], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 21])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 21], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 22])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 22], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 23])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 23], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 24])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 24], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 25])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 25], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 26])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 26], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 27])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 27], [], [expout], [ignore])
AT_CLEANUP
AT_SETUP([handover test 28])
AT_KEYWORDS([handover])
+AT_SKIP_IF([! test "x$build_osmo_bsc" = "xyes"])
cat $abs_srcdir/handover/handover_test.ok > expout
AT_CHECK([$abs_top_builddir/tests/handover/handover_test 28], [], [expout], [ignore])
AT_CLEANUP