summaryrefslogtreecommitdiffstats
path: root/contrib/jenkins_arch.sh
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-01-18 19:15:40 +0100
committerMax <msuraev@sysmocom.de>2018-01-18 19:17:45 +0100
commit1ac277dcef694a2f849a6b5259cf5aa4488bebb9 (patch)
tree2be9006dd753616d3e08cd29ef790513f80440a0 /contrib/jenkins_arch.sh
parentc4759885d7c2aedf310739d9a2420ae1d67a0338 (diff)
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
Diffstat (limited to 'contrib/jenkins_arch.sh')
-rwxr-xr-xcontrib/jenkins_arch.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/jenkins_arch.sh b/contrib/jenkins_arch.sh
new file mode 100755
index 00000000..bac92780
--- /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