Merge pull request #3 from frdeso/for_lttngci
authorMichael Jeanson <mjeanson@gmail.com>
Thu, 17 Nov 2016 16:08:18 +0000 (11:08 -0500)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2016 16:08:18 +0000 (11:08 -0500)
Add baremetal testing and benchmarking integration in Jenkins using Lava

12 files changed:
jobs/babeltrace.yaml
jobs/lttng-tools.yaml
jobs/lttng-ust-java-tests.yaml
jobs/lttng-ust.yaml
scripts/babeltrace/build.sh
scripts/common/coverity.sh
scripts/common/scan-build.sh
scripts/liburcu/build.sh
scripts/lttng-analyses/build.sh
scripts/lttng-analyses/pylint.sh
scripts/lttng-tools/build.sh
scripts/lttng-ust/build.sh

index 5991b4c60d017ce89886d407d43d0f3cafd15b47..d6786d36bbaed66044324e1a4d82fe2d7f8aff26 100644 (file)
     version:
       - stable-1.3
       - stable-1.4
+      - stable-1.5
       - master
     jobs:
       - 'babeltrace_{version}_{buildtype}':
           conf: !!python/tuple [std]
           version:
             - stable-1.4
+            - stable-1.5
             - master
       - 'babeltrace_{version}_cppcheck'
       - 'babeltrace_{version}_scan-build'
             - master-staging
             - stable-1.3-staging
             - stable-1.4-staging
+            - stable-1.5-staging
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
           conf: !!python/tuple [std, static, python-bindings]
+      - 'dev_{user}_babeltrace_{version}_{buildtype}':
+          user: jgalar
+          github_user: jgalar
+          github_name: babeltrace
+          buildtype: macosxbuild
+          version:
+            - master-staging
+            - stable-1.4-staging
+            - stable-1.5-staging
+          arch: !!python/tuple [macosx]
+          build: !!python/tuple [std]
+          conf: !!python/tuple [std]
 
index 7a029396de92dd8e7df623c322c879b21080bd9c..e03b46aa1de1c0204c9a109849ed53c07d0189ab 100644 (file)
       - workspace-cleanup
       - timestamps
       - ansicolor
+      - timeout:
+          timeout: 60
+          fail: true
+          type: absolute
 
     scm:
       - git:
       - conditional-step:
           condition-kind: regex-match
           label: '$conf'
-          regex: (python-bindings|no-ust)
+          regex: no-ust
           on-evaluation-failure: run
           steps:
             - copyartifact:
       - conditional-step:
           condition-kind: regex-match
           label: '$conf'
-          regex: (java-agent|python-agent)
+          regex: agents
           on-evaluation-failure: run
           steps:
             - copyartifact:
 
     builders:
        - copyartifact:
-           project: lttng-tools-{version}/arch=x86-64,build=std,conf=python-agent
+           project: lttng-tools-{version}/arch=x86-64,build=std,conf=agents
            which-build: last-successful
            stable: true
            filter: 'build/**'
           ustversion: master
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [master]
           babelversion: !!python/tuple [master]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: master
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [master]
           babelversion: !!python/tuple [master]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.9
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.9
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.8
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.8
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.7
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.3]
       - 'lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.7
           arch: !!python/tuple [armhf, arm64, powerpc]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.3]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: master
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [master]
           babelversion: !!python/tuple [master]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.9
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.8
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.7
           arch: !!python/tuple [x86-32, x86-64]
           build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.3]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: master
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [master]
           babelversion: !!python/tuple [master]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.9
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.8
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.4]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
           ustversion: stable-2.7
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent]
+          conf: !!python/tuple [std, no-ust, agents]
           urcuversion: !!python/tuple [stable-0.9]
           babelversion: !!python/tuple [stable-1.3]
       - 'dev_{user}_lttng-tools_{version}_{buildtype}':
index e04ec11296904e8474adf9dfed1d27b93b2d4ff2..12ef2b6ddbe3e2304e9753ce938918c18df58cd7 100644 (file)
           target: 'deps'
           do-not-fingerprint: true
       - copyartifact:
-          project: lttng-ust_${{lttng_ust_version}}_build/liburcu_version=${{liburcu_version}},arch=${{arch}},conf=java-agent,build=std
+          project: lttng-ust_${{lttng_ust_version}}_build/liburcu_version=${{liburcu_version}},arch=${{arch}},conf=agents,build=std
           which-build: last-successful
           stable: true
           filter: 'build/**'
           target: 'deps'
           do-not-fingerprint: true
       - copyartifact:
-          project: lttng-tools_${{lttng_tools_version}}_build/babeltrace_version=master,liburcu_version=${{liburcu_version}},arch=${{arch}},conf=java-agent,build=std
+          project: lttng-tools_${{lttng_tools_version}}_build/babeltrace_version=master,liburcu_version=${{liburcu_version}},arch=${{arch}},conf=agents,build=std
           which-build: last-successful
           stable: true
           filter: 'build/**'
index 0e7d693fd8d6c5db5f2fe2e5b7276d7c8e5f57a7..e842aa0b10e596100e89a740c85c7ce608c006bd 100644 (file)
 
     builders:
        - copyartifact:
-           project: lttng-ust-{version}/arch=x86-64,build=std,conf=python-agent
+           project: lttng-ust-{version}/arch=x86-64,build=std,conf=agents
            which-build: last-successful
            stable: true
            filter: 'build/**'
       - 'lttng-ust_{version}_{buildtype}':
           buildtype: build
           arch: !!python/tuple [x86-32, x86-64]
-          build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, java-agent, python-agent]
+          build: !!python/tuple [std, dist, oot, oot-dist]
+          conf: !!python/tuple [std, agents]
       - 'lttng-ust_{version}_{buildtype}':
           buildtype: portbuild
           arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, java-agent, python-agent]
+          conf: !!python/tuple [std, agents]
       - 'lttng-ust_{version}_cppcheck'
       - 'lttng-ust_{version}_scan-build'
       - 'lttng-ust_{version}_coverity':
index 4dc939d1b1637f12c501e672ab737b4e79974455..18532cbd1f1699bb1f4c826c515f9780b2c76393 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Required parameters
+arch=${arch:-}
+conf=${conf:-}
+build=${build:-}
+
 
 SRCDIR="$WORKSPACE/src/babeltrace"
 TMPDIR="$WORKSPACE/tmp"
@@ -109,7 +114,7 @@ case "$build" in
 
     dist)
         echo "Distribution out of tree build"
-        BUILD_PATH="`mktemp -d`"
+        BUILD_PATH="$(mktemp -d)"
 
         # Initial configure and generate tarball
         MAKE=$MAKE BISON="$BISON" YACC="$YACC" "$SRCDIR/configure"
@@ -138,7 +143,7 @@ case "$build" in
 esac
 
 # BUILD!
-$MAKE -j `$NPROC` V=1
+$MAKE -j "$($NPROC)" V=1
 $MAKE install
 
 # Run tests
index 89e0a2c0a409818ea7c678476f12f3e455d64292..7b2e946516a18e434a6140f608f918a70fa96f16 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -xue
+#!/bin/bash -exu
 #
 # Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
 #                      Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
@@ -100,17 +100,17 @@ fi
 
 # Verify upload is permitted
 set +x
-AUTH_RES=`curl -s --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" $SCAN_URL/api/upload_permitted`
+AUTH_RES=$(curl -s --form project="$COVERITY_SCAN_PROJECT_NAME" --form token="$COVERITY_SCAN_TOKEN" $SCAN_URL/api/upload_permitted)
 set -x
 if [ "$AUTH_RES" = "Access denied" ]; then
   echo -e "\033[33;1mCoverity Scan API access denied. Check COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN.\033[0m"
   exit 1
 else
-  AUTH=`echo $AUTH_RES | jq .upload_permitted`
+  AUTH=$(echo "$AUTH_RES" | jq .upload_permitted)
   if [ "$AUTH" = "true" ]; then
     echo -e "\033[33;1mCoverity Scan analysis authorized per quota.\033[0m"
   else
-    WHEN=`echo $AUTH_RES | jq .next_upload_permitted_at`
+    WHEN=$(echo "$AUTH_RES" | jq .next_upload_permitted_at)
     echo -e "\033[33;1mCoverity Scan analysis NOT authorized until $WHEN.\033[0m"
     exit 1
   fi
@@ -118,28 +118,28 @@ fi
 
 
 # Download Coverity Scan Analysis Tool
-if [ ! -d $TOOL_BASE ]; then
-  if [ ! -e $TOOL_ARCHIVE ]; then
+if [ ! -d "$TOOL_BASE" ]; then
+  if [ ! -e "$TOOL_ARCHIVE" ]; then
     echo -e "\033[33;1mDownloading Coverity Scan Analysis Tool...\033[0m"
     set +x
-    wget -nv -O $TOOL_ARCHIVE $TOOL_URL --post-data "project=$COVERITY_SCAN_PROJECT_NAME&token=$COVERITY_SCAN_TOKEN"
+    wget -nv -O "$TOOL_ARCHIVE" "$TOOL_URL" --post-data "project=$COVERITY_SCAN_PROJECT_NAME&token=$COVERITY_SCAN_TOKEN"
     set -x
   fi
 
   # Extract Coverity Scan Analysis Tool
   echo -e "\033[33;1mExtracting Coverity Scan Analysis Tool...\033[0m"
-  mkdir -p $TOOL_BASE
-  cd $TOOL_BASE
-  tar xzf $TOOL_ARCHIVE
+  mkdir -p "$TOOL_BASE"
+  cd "$TOOL_BASE" || exit 1
+  tar xzf "$TOOL_ARCHIVE"
   cd -
 fi
 
-TOOL_DIR=`find $TOOL_BASE -type d -name 'cov-analysis*'`
+TOOL_DIR=$(find "$TOOL_BASE" -type d -name 'cov-analysis*')
 export PATH=$TOOL_DIR/bin:$PATH
 
 cd "$SRCDIR"
 
-COVERITY_SCAN_VERSION=`git describe --always | sed 's|-|.|g'`
+COVERITY_SCAN_VERSION=$(git describe --always | sed 's|-|.|g')
 
 # Prepare build dir
 if [ -f "./bootstrap" ]; then
@@ -149,8 +149,8 @@ fi
 
 # Build
 echo -e "\033[33;1mRunning Coverity Scan Analysis Tool...\033[0m"
-cov-build --dir $RESULTS_DIR $COVERITY_SCAN_BUILD_OPTIONS make -j$NPROC V=1
-cov-import-scm --dir $RESULTS_DIR --scm git --log $RESULTS_DIR/scm_log.txt
+cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" V=1
+cov-import-scm --dir "$RESULTS_DIR" --scm git --log "$RESULTS_DIR/scm_log.txt"
 
 cd "${WORKSPACE}"
 
@@ -163,13 +163,13 @@ echo -e "\033[33;1mUploading Coverity Scan Analysis results...\033[0m"
 set +x
 response=$(curl \
   --silent --write-out "\n%{http_code}\n" \
-  --form project=$COVERITY_SCAN_PROJECT_NAME \
-  --form token=$COVERITY_SCAN_TOKEN \
-  --form email=$COVERITY_SCAN_NOTIFICATION_EMAIL \
-  --form file=@$RESULTS_ARCHIVE \
-  --form version=$COVERITY_SCAN_VERSION \
-  --form description=$COVERITY_SCAN_DESCRIPTION \
-  $UPLOAD_URL)
+  --form project="$COVERITY_SCAN_PROJECT_NAME" \
+  --form token="$COVERITY_SCAN_TOKEN" \
+  --form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \
+  --form file=@"$RESULTS_ARCHIVE" \
+  --form version="$COVERITY_SCAN_VERSION" \
+  --form description="$COVERITY_SCAN_DESCRIPTION" \
+  "$UPLOAD_URL")
 set -x
 status_code=$(echo "$response" | sed -n '$p')
 if [ "$status_code" != "201" ]; then
@@ -177,3 +177,5 @@ if [ "$status_code" != "201" ]; then
   echo -e "\033[33;1mCoverity Scan upload failed: $TEXT.\033[0m"
   exit 1
 fi
+
+# EOF
index 8ff83044215a8bab782561f2a9450a832ed27549..e46a52034062717f62cff050fc8760f738b2d87f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -exu
+#!/bin/bash -exu
 #
 # Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #               2016 - Michael Jeanson <mjeanson@efficios.com>
index 8a699ea92bcd4691d37c1b68abd45b328fbb50dc..796f4aa02a4a2ac91a213d1ed0b9da3bdd9f669f 100755 (executable)
@@ -69,6 +69,11 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+# Required parameters
+arch=${arch:-}
+conf=${conf:-}
+build=${build:-}
+
 
 SRCDIR="$WORKSPACE/src/liburcu"
 TMPDIR="$WORKSPACE/tmp"
@@ -124,7 +129,7 @@ static)
     CONF_OPTS="--enable-static --disable-shared"
     ;;
 
-tls_fallback)  
+tls_fallback)
     echo  "Using pthread_getspecific() to emulate TLS"
     CONF_OPTS="--disable-compiler-tls"
     ;;
@@ -143,7 +148,7 @@ cd "$SRCDIR"
 ./bootstrap
 
 # Get source version from configure script
-eval `grep '^PACKAGE_VERSION=' ./configure`
+eval "$(grep '^PACKAGE_VERSION=' ./configure)"
 
 
 # Build type
@@ -165,7 +170,7 @@ oot)
 
 dist)
     echo "Distribution out of tree build"
-    BUILD_PATH=`mktemp -d`
+    BUILD_PATH=$(mktemp -d)
 
     # Initial configure and generate tarball
     MAKE=$MAKE "$SRCDIR/configure"
@@ -187,7 +192,7 @@ dist)
 esac
 
 # BUILD!
-$MAKE -j `$NPROC` V=1
+$MAKE -j "$($NPROC)" V=1
 $MAKE install
 
 # Run tests
index ef19043d64836f194b2ffb1450cb06fa65107e1d..a0f5e8922adcc903ada9c0e0e1917776cffa1f90 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -exu
+#!/bin/bash -exu
 #
 # Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
 #
index 47947cf66aab169822b966f21cc100ce9d2d8f0d..fb10d465276764c3331ee0f220a0cb0e712005b3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -exu
+#!/bin/bash -exu
 #
 # Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
 #
index 34c04c9f4fcf277c3a876f135ccf0886261cc728..2c436adc5fe423d5b88588a05a10c86d37620089 100755 (executable)
@@ -75,16 +75,16 @@ conf=${conf:-}
 build=${build:-}
 
 SRCDIR="$WORKSPACE/src/lttng-tools"
-TMPDIR="$WORKSPACE/tmp"
+#TMPDIR="$WORKSPACE/tmp"
 PREFIX="$WORKSPACE/build"
 TAPDIR="$WORKSPACE/tap"
 
 
 # Create build and tmp directories
-rm -rf "$PREFIX" "$TMPDIR" "$TAPDIR"
-mkdir -p "$PREFIX" "$TMPDIR" "$TAPDIR"
+rm -rf "$PREFIX" "$TAPDIR"
+mkdir -p "$PREFIX" "$TAPDIR"
 
-export TMPDIR
+#export TMPDIR
 
 # liburcu
 URCU_INCS="$WORKSPACE/deps/liburcu/build/include/"
@@ -200,30 +200,26 @@ static)
     CONF_OPTS="--enable-static --disable-shared"
     ;;
 
-python-bindings)
-    echo "Build with python bindings"
-    # We only support bindings built with Python 3
-    export PYTHON="python3"
-    export PYTHON_CONFIG="/usr/bin/python3-config"
-    CONF_OPTS="--enable-python-bindings"
-    ;;
-
 no-ust)
     echo "Build without UST support"
     CONF_OPTS="$NO_UST"
     ;;
 
-java-agent)
-    echo "Build with Java Agents"
+agents)
+    echo "Enable Java Agents"
     export JAVA_HOME="/usr/lib/jvm/default-java"
     export CLASSPATH="$UST_JAVA/*:/usr/share/java/*"
-    CONF_OPTS="--enable-test-java-agent-all"
-    ;;
+    CONF_OPTS+=" --enable-test-java-agent-all"
 
-python-agent)
-    echo "Build with python agents"
+    echo "Enable Python agents"
     export PYTHONPATH="$UST_PYTHON2:$UST_PYTHON3"
-    CONF_OPTS="--enable-test-python-agent-all"
+    CONF_OPTS+=" --enable-test-python-agent-all"
+
+    echo "Enable Python bindings"
+    # We only support bindings built with Python 3
+    export PYTHON="python3"
+    export PYTHON_CONFIG="/usr/bin/python3-config"
+    CONF_OPTS+=" --enable-python-bindings"
     ;;
 
 relayd-only)
@@ -239,9 +235,10 @@ esac
 
 
 # Build type
-# oot : out-of-tree build
-# dist: build via make dist
-# *   : normal tree build
+# oot     : out-of-tree build
+# dist    : build via make dist
+# oot-dist: build via make dist out-of-tree
+# *       : normal tree build
 #
 # Make sure to move to the build_path and run configure
 # before continuing
@@ -256,23 +253,46 @@ case "$build" in
         ;;
 
     dist)
-        echo "Distribution out of tree build"
-       BUILD_PATH="$(mktemp -d)"
+        echo "Distribution tarball in-tree build"
 
         # Initial configure and generate tarball
         MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages
         $MAKE dist
 
-        mkdir -p "$BUILD_PATH"
+        BUILD_PATH="$(mktemp -d)"
         cp ./*.tar.* "$BUILD_PATH/"
         cd "$BUILD_PATH"
 
         # Ignore level 1 of tar
         $TAR xvf ./*.tar.* --strip 1
 
+        # Build in extracted source tree
         MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
         ;;
 
+    oot-dist)
+        echo "Distribution tarball out of tree build"
+        BUILD_PATH="$(mktemp -d)"
+        cd "$BUILD_PATH"
+
+        # Initial configure and generate tarball
+        MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages
+        $MAKE dist
+
+        NEWSRC_PATH="$(mktemp -d)"
+        cp ./*.tar.* "$NEWSRC_PATH/"
+        cd "$NEWSRC_PATH"
+
+        # Ignore level 1 of tar
+        $TAR xvf ./*.tar.* --strip 1
+
+        BUILD_PATH="$(mktemp -d)"
+        cd "$BUILD_PATH"
+
+        # Build oot from extracted sources
+        MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
+        ;;
+
     *)
         echo "Standard tree build"
         MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
index ccb3683bdb4d4a798bf5c352c5abb5a95867def7..80488e486d87f956247ce8f165c64317743469f0 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Required parameters
+arch=${arch:-}
+conf=${conf:-}
+build=${build:-}
+
 
 # liburcu
 URCU_INCS="$WORKSPACE/deps/liburcu/build/include/"
@@ -37,9 +42,9 @@ case "$arch" in
      MAKE=make
      TAR=tar
      NPROC=nproc
-     BISON="bison"
-     YACC="$BISON -y"
-     CFLAGS=""
+     #BISON="bison"
+     #YACC="$BISON -y"
+     #CFLAGS=""
      ;;
 esac
 
@@ -58,15 +63,13 @@ static)
     CONF_OPTS="--enable-static --disable-shared"
     ;;
 
-java-agent)
-    echo "Java agent build"
+agents)
+    echo "Enable Java agent build"
     export CLASSPATH="/usr/share/java/log4j-1.2.jar"
-    CONF_OPTS="--enable-java-agent-all"
-    ;;
+    CONF_OPTS+=" --enable-java-agent-all --enable-jni-interface"
 
-python-agent)
-    echo "Python agent build"
-    CONF_OPTS="--enable-python-agent"
+    echo "Enable Python agent build"
+    CONF_OPTS+=" --enable-python-agent"
     ;;
 
 *)
@@ -83,9 +86,10 @@ cd "$SRCDIR"
 
 
 # Build type
-# oot : out-of-tree build
-# dist: build via make dist
-# *   : normal tree build
+# oot     : out-of-tree build
+# dist    : build via make dist
+# oot-dist: build via make dist out-of-tree
+# *       : normal tree build
 #
 # Make sure to move to the build_path and configure
 # before continuing
@@ -94,29 +98,54 @@ case "$build" in
 oot)
     echo "Out of tree build"
     BUILD_PATH=$WORKSPACE/oot
+
     mkdir -p "$BUILD_PATH"
     cd "$BUILD_PATH"
+
     "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS
     ;;
 
 dist)
-    echo "Distribution out of tree build"
-    BUILD_PATH="`mktemp -d`"
+    echo "Distribution tarball in-tree build"
 
     # Initial configure and generate tarball
     "$SRCDIR/configure"
     $MAKE dist
 
-    mkdir -p "$BUILD_PATH"
+    BUILD_PATH="$(mktemp -d)"
     cp ./*.tar.* "$BUILD_PATH/"
     cd "$BUILD_PATH"
 
     # Ignore level 1 of tar
     $TAR xvf ./*.tar.* --strip 1
 
+    # Build in extracted source tree
     "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
     ;;
 
+oot-dist)
+    echo "Distribution tarball out of tree build"
+    BUILD_PATH="$(mktemp -d)"
+    cd "$BUILD_PATH"
+
+    # Initial configure and generate tarball
+    "$SRCDIR/configure"
+    $MAKE dist
+
+    NEWSRC_PATH="$(mktemp -d)"
+    cp ./*.tar.* "$NEWSRC_PATH/"
+    cd "$NEWSRC_PATH"
+
+    # Ignore level 1 of tar
+    $TAR xvf ./*.tar.* --strip 1
+
+    BUILD_PATH="$(mktemp -d)"
+    cd "$BUILD_PATH"
+
+    # Build oot from extracted sources
+    "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
+    ;;
+
 *)
     echo "Standard in-tree build"
     "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS
@@ -124,7 +153,7 @@ dist)
 esac
 
 # BUILD!
-$MAKE -j "`$NPROC`" V=1
+$MAKE -j "$($NPROC)" V=1
 $MAKE install
 
 # Run tests
This page took 0.036325 seconds and 4 git commands to generate.