[PATCH] libosmocore[master]: jenkins: add dispatcher script

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.org
Thu Jan 18 18:18:00 UTC 2018


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5884

to look at the new patch set (#2).

jenkins: add dispatcher script

Similar to the way we test osmo-bts, add simple dispatcher script which
calls appropriate test depending on a given parameter. This will allow
to simplify the job description. While at it, also rename jenkins-arm.sh
-> jenkins_arm.sh to match the OsmoBTS.

The older scripts are preserved for compatibility and shall be removed
once we update job description in osmo-ci.

Change-Id: I2955e866bce4f000a53369bd601a346c36c82468
---
A contrib/jenkins_amd64.sh
A contrib/jenkins_arch.sh
A contrib/jenkins_arm.sh
3 files changed, 94 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/84/5884/2

diff --git a/contrib/jenkins_amd64.sh b/contrib/jenkins_amd64.sh
new file mode 100755
index 0000000..d336f0a
--- /dev/null
+++ b/contrib/jenkins_amd64.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# jenkins build helper script for libosmocore. This is how we build on jenkins.osmocom.org
+
+. $(dirname "$0")/jenkins_common.sh
+
+ENABLE_SANITIZE="--enable-sanitize"
+
+if [ "x$label" = "xFreeBSD_amd64" ]; then
+        ENABLE_SANITIZE=""
+fi
+
+src_dir="$PWD"
+build() {
+    build_dir="$1"
+
+    prep_build "$src_dir" "$build_dir"
+
+    "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror"
+    $MAKE V=1 $PARALLEL_MAKE check \
+        || cat-testlogs.sh
+}
+
+# verify build in dir other than source tree
+build builddir
+# verify build in source tree
+build .
+
+# do distcheck only once, which is fine from built source tree, since distcheck
+# is well separated from the source tree state.
+$MAKE distcheck \
+    || cat-testlogs.sh
+
+osmo-clean-workspace.sh
diff --git a/contrib/jenkins_arch.sh b/contrib/jenkins_arch.sh
new file mode 100755
index 0000000..bac9278
--- /dev/null
+++ b/contrib/jenkins_arch.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# this is a dispatcher script which will call the arch-specific
+# script based on the arch specified as command line argument
+
+arch="$1"
+
+if [ "x$arch" == "x" ]; then
+	echo "Error: You have to specify the architecture as first argument, e.g. $0 amd64"
+	exit 2
+fi
+
+if [ ! -d "./contrib" ]; then
+  echo "Run ./contrib/jenkins_arch.sh from the root of the libosmocore tree"
+  exit 1
+fi
+
+set -x -e
+
+case "$arch" in
+
+  amd64)
+    ./contrib/jenkins_amd64.sh
+  ;;
+
+  arch)
+    ./contrib/jenkins_arch.sh
+  ;;
+
+  *)
+    set +x
+    echo "Unexpected architecture '$arch'"
+  ;;
+esac
diff --git a/contrib/jenkins_arm.sh b/contrib/jenkins_arm.sh
new file mode 100755
index 0000000..acdbe3c
--- /dev/null
+++ b/contrib/jenkins_arm.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+. $(dirname "$0")/jenkins_common.sh
+
+src_dir="$PWD"
+build() {
+    build_dir="$1"
+
+    prep_build "$src_dir" "$build_dir"
+
+    "$src_dir"/configure --enable-static \
+	--prefix=/usr/local/arm-none-eabi \
+	--host=arm-none-eabi \
+	--enable-embedded \
+	--disable-doxygen \
+	--disable-shared \
+	CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror"
+
+    $MAKE $PARALLEL_MAKE \
+        || cat-testlogs.sh
+}
+
+# verify build in dir other than source tree
+build builddir
+# verify build in source tree
+build .
+
+osmo-clean-workspace.sh

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2955e866bce4f000a53369bd601a346c36c82468
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list