jjb: Add env and os details printing to build jobs
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 30 Sep 2020 20:33:16 +0000 (16:33 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Wed, 30 Sep 2020 20:33:16 +0000 (16:33 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
39 files changed:
jobs/babeltrace.yaml
jobs/librseq.yaml
jobs/liburcu.yaml
jobs/lttng-tools.yaml
jobs/lttng-ust.yaml
scripts/babeltrace-benchmark/benchmark.sh
scripts/babeltrace/build.sh
scripts/babeltrace/pylint.sh
scripts/babeltrace/release.sh
scripts/barectf/build.sh
scripts/common/coverity.sh
scripts/common/override-build-std.sh
scripts/common/print.sh [new file with mode: 0755]
scripts/common/scan-build.sh
scripts/kernel/build.sh
scripts/librseq/build.sh
scripts/liburcu/build.sh
scripts/lttng-analyses/build.sh
scripts/lttng-analyses/pylint.sh
scripts/lttng-modules/build.sh
scripts/lttng-modules/param-build.sh
scripts/lttng-scope/launch-wm.sh
scripts/lttng-tools/build.sh
scripts/lttng-tools/clean_processes_coredump.sh
scripts/lttng-tools/gerrit-depends-on.sh
scripts/lttng-tools/gerrit-install-deps.sh
scripts/lttng-tools/hang_processes.sh
scripts/lttng-tools/release.sh
scripts/lttng-ust-benchmarks/build.sh
scripts/lttng-ust-java-tests/start-sessiond.sh
scripts/lttng-ust-java-tests/stop-sessiond.sh
scripts/lttng-ust/build.sh
scripts/packaging/el7/add-efficios-repo.sh
scripts/packaging/el7/install-lttng-packages.sh
scripts/packaging/sles12/add-efficios-repo.sh
scripts/packaging/sles12/install-lttng-packages.sh
scripts/packaging/systemd-enable-and-start-relayd.sh
scripts/packaging/systemd-enable-and-start-sessiond.sh
scripts/packaging/test-run.sh

index 065e640cc216f7c08f69d7038c43e0002d30572a..a22237b5622036ecbb215e74b7cfcedc49f91c51 100644 (file)
@@ -94,7 +94,9 @@
     name: 'babeltrace_build_builders_defaults'
     builders:
       - shell:
-         !include-raw-escape: scripts/babeltrace/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/babeltrace/build.sh
 
 - babeltrace_build_builders_win: &babeltrace_build_builders_win
     name: 'babeltrace_build_builders_win'
                !include-raw-escape:
                  - scripts/common/cygwin64-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/babeltrace/build.sh
       - conditional-step:
           condition-kind: strings-match
                !include-raw-escape:
                  - scripts/common/msys2-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/babeltrace/build.sh
       - conditional-step:
           condition-kind: strings-match
                !include-raw-escape:
                  - scripts/common/msys2-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/babeltrace/build.sh
 
 
           make install
 
       - shell:
-         !include-raw-escape: scripts/babeltrace/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/babeltrace/build.sh
 
 - job-template:
     name: babeltrace_{version}_glib-2.28.6
index 001509c6503add3882ad8da268a5fec736c1298c..e82a0cae3a1e1995989ff1cf67262c1ae0fb4f9e 100644 (file)
@@ -97,7 +97,9 @@
     name: 'librseq_build_builders_defaults'
     builders:
       - shell:
-         !include-raw-escape: scripts/librseq/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/librseq/build.sh
 
 - librseq_build_publishers_defaults: &librseq_build_publishers_defaults
     name: 'librseq_build_publishers_defaults'
index ec179c72d220d86766ed46ac4572f6a28182fe95..98e40b4478093025567eca59d86cca42ced23852 100644 (file)
@@ -85,7 +85,9 @@
     name: 'liburcu_build_builders_defaults'
     builders:
       - shell:
-         !include-raw-escape: scripts/liburcu/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/liburcu/build.sh
 
 - liburcu_build_builders_win: &liburcu_build_builders_win
     name: 'liburcu_build_builders_win'
                !include-raw-escape:
                  - scripts/common/cygwin64-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/liburcu/build.sh
 
 - liburcu_build_publishers_defaults: &liburcu_build_publishers_defaults
index 28615f2cc89e6071a24de39ffb24de849cde4b48..98f887f4b143f89d1ddf490d2a0ad40b5f6897ff 100644 (file)
       - shell:
          !include-raw-escape: scripts/lttng-tools/clean_processes_coredump.sh
       - shell:
-         !include-raw-escape: scripts/lttng-tools/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/lttng-tools/build.sh
 
 - lttng-tools_build_builders_gerrit: &lttng-tools_build_builders_gerrit
     name: 'lttng-tools_build_builders_gerrit'
             - shell:
                !include-raw-escape:
                    - scripts/common/override-build-std.sh
+                   - scripts/common/print.sh
                    - scripts/lttng-ust/build.sh
       - shell:
          !include-raw-escape: scripts/lttng-tools/gerrit-install-deps.sh
       - shell:
-         !include-raw-escape: scripts/lttng-tools/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/lttng-tools/build.sh
 
 - lttng-tools_build_builders_win: &lttng-tools_build_builders_win
     name: 'lttng-tools_build_builders_win'
                !include-raw-escape:
                  - scripts/common/cygwin64-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/lttng-tools/build.sh
       - conditional-step:
           condition-kind: strings-match
                !include-raw-escape:
                  - scripts/common/msys2-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/lttng-tools/build.sh
       - conditional-step:
           condition-kind: strings-match
                !include-raw-escape:
                  - scripts/common/msys2-shebang
                  - scripts/common/cygpath-prefix
+                 - scripts/common/print.sh
                  - scripts/lttng-tools/build.sh
 
 - lttng-tools_build_publishers_dev: &lttng-tools_build_publishers_dev
index 894769bbe51f1a24a11e2df5951e830aee549e8d..c8dbdb830e2678a8eeb80380e00006f8cf0e5afb 100644 (file)
                 target: 'deps'
                 do-not-fingerprint: true
       - shell:
-         !include-raw-escape: scripts/lttng-ust/build.sh
+         !include-raw-escape:
+           - scripts/common/print.sh
+           - scripts/lttng-ust/build.sh
 
 
 ## Templates
index c9f579c90300cdf8e3f8eef67ce6f9e968e533da..57a788f67d2af6561f6f50986bcde7a12be6e626 100755 (executable)
@@ -1,6 +1,6 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
-# Copyright (C) 2019 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+# Copyright (C) 2019 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 SRC_DIR="$WORKSPACE/src/babeltrace"
 SCRIPT_DIR="$WORKSPACE/src/lttng-ci"
 RESULTS_DIR="$WORKSPACE/results"
index b81adec457b88bdb54a4abf276838f07a810212e..a9ad856d344b837c1fac8f8c77d6955233a9d24d 100755 (executable)
@@ -1,7 +1,7 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-#               2016-2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2016-2020 Michael Jeanson <mjeanson@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
@@ -69,6 +71,15 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+failed_configure() {
+    # Assume we are in the configured build directory
+    echo "#################### BEGIN config.log ####################"
+    cat config.log
+    echo "#################### END config.log ####################"
+    exit 1
+}
+
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
@@ -206,6 +217,10 @@ cygwin)
     ;;
 esac
 
+# Print build env details
+print_os || true
+print_tooling || true
+
 # Enter the source directory
 cd "$SRCDIR"
 
@@ -288,7 +303,7 @@ oot)
     builddir=$(mktemp -d)
     cd "$builddir"
 
-    "$SRCDIR/configure" "${CONF_OPTS[@]}"
+    "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 dist)
@@ -296,7 +311,7 @@ dist)
 
     # Run configure and generate the tar file
     # in the source directory
-    ./configure
+    ./configure || failed_configure
     $MAKE dist
 
     # Create and enter a temporary build directory
@@ -308,7 +323,7 @@ dist)
     $TAR xvf "$SRCDIR"/*.tar.* --strip 1
 
     # Build in extracted source tree
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 oot-dist)
@@ -319,7 +334,7 @@ oot-dist)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
-    "$SRCDIR/configure"
+    "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
     dist_srcdir="$(mktemp -d)"
@@ -335,12 +350,12 @@ oot-dist)
 
     # Run configure from the extracted distribution tar,
     # out of the source tree
-    "$dist_srcdir/configure" "${CONF_OPTS[@]}"
+    "$dist_srcdir/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 *)
     echo "Standard in-tree build"
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 esac
 
index ffb45b9ec98a699fb4f03c00d79fd031f8e11e0f..839d86266da2edfe4c686ac06e0967b9e4d02270 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
 # Copyright (C) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 set -o pipefail
 
 PYTHON3=python3
index 32306e1e648cbfbbd06577bcd720f255fb66e491..beff09718a1652052268d61b8a8d6192703c8d53 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 # Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
index 39e05592ce86d23a85eb645423cfd2c0f7ae2b39..cd0c31c88be67ba37a0b4c6b2b83a2acaa7cad0d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -exu
+#!/bin/sh
 #
 # Copyright (C) 2015-2020 Michael Jeanson <mjeanson@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 SRCDIR="src/barectf"
 
 PYTHON3="python3"
index b5ca3690a0787a62c9512fc571c4436537b0db6d..a224f388fc16980521756b440ac1cce56a270027 100755 (executable)
@@ -1,6 +1,6 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
-# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
index 003ee7a52270d85ef857d086615c84b4647dd982..658c01f8265bb3a1e6e146b4ab44797f2932bea6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2020 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #
@@ -18,5 +18,7 @@
 # This file should be used as a jenkins job builder RAW import allowing the
 # override of the "build" variable on shell builder execution.
 
+set -exu
+
 # shellcheck disable=SC2034
 build=std
diff --git a/scripts/common/print.sh b/scripts/common/print.sh
new file mode 100755 (executable)
index 0000000..21c5e60
--- /dev/null
@@ -0,0 +1,162 @@
+#!/bin/bash
+#
+# Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set -exu
+
+COLOR_BLUE='\033[0;34m'
+COLOR_NONE='\033[0m' # No Color
+
+print_blue() {
+       echo -e "${COLOR_BLUE}$1${COLOR_NONE}"
+}
+
+print_os() {
+    set +ex
+
+    print_blue "Operating System Details"
+
+    if [ -f "/etc/os-release" ]; then
+        (. "/etc/os-release"; echo "Version: $NAME $VERSION")
+    elif [ -f "/etc/release" ]; then
+        echo "Version: $(head -n1 /etc/release)"
+    elif command -v sw_vers >/dev/null 2>&1; then
+        # For MacOS
+       echo "Version: $(sw_vers -productName) $(sw_vers -productVersion)"
+    fi
+
+    echo -n "Kernel: "
+    uname -a
+
+    set -ex
+}
+
+print_pkgconfig_mod() {
+    local mod=$1
+    if pkg-config --exists "${mod}"; then
+        print_blue "$mod version"
+        pkg-config --modversion "${mod}"
+    fi
+}
+
+print_tooling() {
+    set +ex
+
+    print_blue "Selected CC version"
+    ${CC:-cc} --version | head -n1
+
+    print_blue "Default gcc version"
+    gcc --version | head -n1
+    gcc -dumpmachine
+
+    if command -v clang >/dev/null 2>&1; then
+        print_blue "Default clang version"
+        clang --version
+    fi
+
+    print_blue "git version"
+    git --version
+
+    print_blue "bash version"
+    bash --version | head -n1
+
+    print_blue "make version"
+    ${MAKE:-make} --version | head -n1
+
+    if command -v cmake >/dev/null 2>&1; then
+        print_blue "cmake version"
+       cmake --version
+    fi
+
+    print_blue "automake version"
+    automake --version | head -n1
+
+    print_blue "autoconf version"
+    autoconf --version | head -n1
+
+    print_blue "libtool version"
+    if libtool --version >/dev/null 2>&1; then
+        libtool --version | head -n1
+    else
+        # Thanks Apple!
+        libtool -V
+    fi
+
+    print_blue "bison version"
+    ${BISON:-bison} --version | head -n1
+
+    print_blue "flex version"
+    ${FLEX:-flex} --version
+
+    print_blue "swig version"
+    swig -version | ${GREP:-grep} SWIG
+
+    print_blue "tar version"
+    ${TAR:-tar} --version | head -n1
+
+    print_blue "Selected python version"
+    ${PYTHON} --version
+
+    if command -v "${PYTHON2:-python2}" >/dev/null 2>&1; then
+        print_blue "python2 version"
+        ${PYTHON2:-python2} --version
+    fi
+
+    if command -v "${PYTHON3:-python3}" >/dev/null 2>&1; then
+        print_blue "python3 version"
+        ${PYTHON3:-python3} --version
+    fi
+
+    print_blue "java version"
+    java -version
+
+    print_blue "javac version"
+    javac -version
+
+    if command -v asciidoc >/dev/null 2>&1; then
+        print_blue "asciidoc version"
+       asciidoc --version
+    fi
+
+    if command -v xmlto >/dev/null 2>&1; then
+        print_blue "xmlto version"
+       xmlto --version
+    fi
+
+    if command -v openssl >/dev/null 2>&1; then
+        print_blue "openssl version"
+       openssl version
+    fi
+
+    if command -v pkg-config >/dev/null 2>&1; then
+        print_blue "pkg-config version"
+        pkg-config --version
+
+        #print_blue "pkg-config modules installed"
+        #pkg-config --list-all
+
+        print_pkgconfig_mod glib-2.0
+        print_pkgconfig_mod libdw
+        print_pkgconfig_mod libelf
+        print_pkgconfig_mod libxml-2.0
+       print_pkgconfig_mod msgpack
+        print_pkgconfig_mod popt
+        print_pkgconfig_mod uuid
+        print_pkgconfig_mod zlib
+    fi
+
+    set -ex
+}
index 7a703e1cf52de529402cd00e8e7e4b11480adf40..5ef74c30787cc23d92d0bec0f0f8a21e3a44bc9f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 # Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
index 614f1d8f4446b39520183612410ba7dd5bbd6d48..0134eda4638c41c76dcec9904eafa4127c05b7e4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -exu
+#!/bin/sh
 #
 # Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #                      Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 #Check if ccache is present
 #if [ -d /usr/lib/ccache ]; then
 #      echo "Using CCACHE"
index 92865de62bb34a933c25f68cf40318ec738c26a9..826cfa91760c910fbf4111e9f38705e6e44a5191 100755 (executable)
@@ -1,7 +1,7 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2019-2020 Michael Jeanson <mjeanson@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
@@ -69,6 +71,16 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+failed_configure() {
+    # Assume we are in the configured build directory
+    echo "#################### BEGIN config.log ####################"
+    cat config.log
+    echo "#################### END config.log ####################"
+
+    # End the build with failure
+    exit 1
+}
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
@@ -166,6 +178,10 @@ case "$arch" in
     ;;
 esac
 
+# Print build env details
+print_os || true
+print_tooling || true
+
 # Enter the source directory
 cd "$SRCDIR"
 
@@ -208,7 +224,7 @@ oot)
     builddir=$(mktemp -d)
     cd "$builddir"
 
-    "$SRCDIR/configure" "${CONF_OPTS[@]}"
+    "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 dist)
@@ -216,7 +232,7 @@ dist)
 
     # Run configure and generate the tar file
     # in the source directory
-    ./configure
+    ./configure || failed_configure
     $MAKE dist
 
     # Create and enter a temporary build directory
@@ -228,7 +244,7 @@ dist)
     $TAR xvf "$SRCDIR"/*.tar.* --strip 1
 
     # Build in extracted source tree
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 oot-dist)
@@ -239,7 +255,7 @@ oot-dist)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
-    "$SRCDIR/configure"
+    "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
     dist_srcdir="$(mktemp -d)"
@@ -255,12 +271,12 @@ oot-dist)
 
     # Run configure from the extracted distribution tar,
     # out of the source tree
-    "$dist_srcdir/configure" "${CONF_OPTS[@]}"
+    "$dist_srcdir/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 *)
     echo "Standard in-tree build"
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 esac
 
index 76f8d3cc60389672146dd1a4c4d2c6a783d1b942..7924a06435b4da85924e1140be5299bbbebce733 100755 (executable)
@@ -1,7 +1,7 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-#               2016-2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2016-2020 Michael Jeanson <mjeanson@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
@@ -69,6 +71,16 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+failed_configure() {
+    # Assume we are in the configured build directory
+    echo "#################### BEGIN config.log ####################"
+    cat config.log
+    echo "#################### END config.log ####################"
+
+    # End the build with failure
+    exit 1
+}
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
@@ -197,6 +209,10 @@ macosx)
     ;;
 esac
 
+# Print build env details
+print_os || true
+print_tooling || true
+
 # Enter the source directory
 cd "$SRCDIR"
 
@@ -257,7 +273,7 @@ oot)
     builddir=$(mktemp -d)
     cd "$builddir"
 
-    "$SRCDIR/configure" "${CONF_OPTS[@]}"
+    "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 dist)
@@ -265,7 +281,7 @@ dist)
 
     # Run configure and generate the tar file
     # in the source directory
-    ./configure
+    ./configure || failed_configure
     $MAKE dist
 
     # Create and enter a temporary build directory
@@ -277,7 +293,7 @@ dist)
     $TAR xvf "$SRCDIR"/*.tar.* --strip 1
 
     # Build in extracted source tree
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 oot-dist)
@@ -288,7 +304,7 @@ oot-dist)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
-    "$SRCDIR/configure"
+    "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
     dist_srcdir="$(mktemp -d)"
@@ -304,12 +320,12 @@ oot-dist)
 
     # Run configure from the extracted distribution tar,
     # out of the source tree
-    "$dist_srcdir/configure" "${CONF_OPTS[@]}"
+    "$dist_srcdir/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 *)
     echo "Standard in-tree build"
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 esac
 
index 8d193d965b3d56b4c9af3d215bf2b78728375a8a..de86ae89e213845f30f851c2bda7b87975741855 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Has to be set in the environment
 #CODECOV_TOKEN=""
 
index 4eb9693a9ad627274ed9f99bb35355ac13e7d715..426fcc4b6632b6a4e01d02ec2d96544281de8d27 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 SRCDIR="src/lttng-analyses"
 
 PYTHON3="python3"
index a301c918a85c1c82828f4ff9bf0c55ae847225c1..b52aead53a04d82fb6cc61247bedcf76557058dd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh -exu
+#!/bin/sh
 #
 # Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #                      Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Kernel version compare functions
 verlte() {
     [  "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
index e8709d2e0200bbbed7beda97d9b92d15442554ea..dbfa5eea68eb98124ecb910f7ae265f6ca2f725e 100644 (file)
@@ -1,6 +1,6 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
-# Copyright (C) 2016-2019 Michael Jeanson <mjeanson@efficios.com>
+# Copyright (C) 2016-2019 Michael Jeanson <mjeanson@efficios.com>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Parameters
 arch=${arch:-}
 cross_arch=${cross_arch:-}
index 72e4712adb507789bca1e99b2043141680c6311b..8a65f04047efe21adb87eb64026e9df28c76934c 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 - Alexandre Montplaisir <alexmonthy@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Required parameters
 #wm=${wm:-}
 wm="unity"
index b44dd2c82098f470440890973a9ce5fed8b77288..394575c1cb162ffd25332a6ad753cca881f707f4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 # shellcheck disable=SC2103
 #
 # Copyright (C) 2016 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
@@ -17,6 +17,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
@@ -70,6 +72,16 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+failed_configure() {
+    # Assume we are in the configured build directory
+    echo "#################### BEGIN config.log ####################"
+    cat config.log
+    echo "#################### END config.log ####################"
+
+    # End the build with failure
+    exit 1
+}
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
@@ -269,6 +281,10 @@ if [ -d "$WORKSPACE/src/lttng-modules" ]; then
     depmod
 fi
 
+# Print build env details
+print_os || true
+print_tooling || true
+
 # Enter the source directory
 cd "$SRCDIR"
 
@@ -350,7 +366,7 @@ oot)
     builddir=$(mktemp -d)
     cd "$builddir"
 
-    "$SRCDIR/configure" "${CONF_OPTS[@]}"
+    "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 dist)
@@ -358,7 +374,7 @@ dist)
 
     # Run configure and generate the tar file
     # in the source directory
-    ./configure "${DIST_CONF_OPTS[@]}"
+    ./configure "${DIST_CONF_OPTS[@]}" || failed_configure
     $MAKE dist
 
     # Create and enter a temporary build directory
@@ -370,7 +386,7 @@ dist)
     $TAR xvf "$SRCDIR"/*.tar.* --strip 1
 
     # Build in extracted source tree
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 oot-dist)
@@ -381,7 +397,7 @@ oot-dist)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
-    "$SRCDIR/configure" "${DIST_CONF_OPTS[@]}"
+    "$SRCDIR/configure" "${DIST_CONF_OPTS[@]}" || failed_configure
     $MAKE dist
 
     dist_srcdir="$(mktemp -d)"
@@ -397,12 +413,12 @@ oot-dist)
 
     # Run configure from the extracted distribution tar,
     # out of the source tree
-    "$dist_srcdir/configure" "${CONF_OPTS[@]}"
+    "$dist_srcdir/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 *)
     echo "Standard in-tree build"
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 esac
 
index 91082fb6b13d75069a4301f4d028e353d7c76aaa..bf856a04475d1780578412d49ec60abfa95c7f79 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2018 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 PGREP=pgrep
 # Kill any LTTng-related process
 lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')" || true
index 7b47b9341f250e46878dc983f28bc36ea713eef2..b8bcd4e9a30d6b07da061534bcaa6adbf7918c30 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 # shellcheck disable=SC2103
 #
 # Copyright (C) 2020 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 #Required variables
 GERRIT_NAME=${GERRIT_NAME:-}
 WORKSPACE=${WORKSPACE:-}
index a04f82c21f7f7af1557b414481e200b60db4ec6b..f43e4eca5060dba7bf436a20e52041f272f89640 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2020 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
index 34f8ef03d13bb48e31e5e072cef6a6815e7b34c2..3e52a607a3ddb6a3396ff17d680abff3be9d8fba 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2018 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #
@@ -15,6 +15,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 PGREP=pgrep
 pids=""
 file_list=$(mktemp)
index 0bd5c5ca9ec8051e4043e415c009f3a1d27d798b..de65b7a830210635e01ed85cd3d325d7274091c6 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 # Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
index 10b1c05043c4af51ed283dbbe16812fb33888c20..a2799b9d1abf95a36ec01ece0868ce86457ce884 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015, Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #               2016, Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 SRCDIR="$WORKSPACE/src/$PROJECT_NAME"
 
 # Create build directory
index 7be69886841cfc191af88acc891ad581ce103753..894b519c0bb7be31ee27ff5a3b112ed0a24daa72 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/bash -exu
+#!/bin/bash
+
+set -exu
 
 # Start the lttng-sessiond
 lttng-sessiond -b -vvv 1>lttng-sessiond.log 2>&1
index 33ee3a3d4e2fa9d088d9d83317d8ceec285c80b7..de1e737eaaf02649bc55c99144ba67ccaa6203ea 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/bash -exu
+#!/bin/bash
+
+set -exu
 
 # Kill the sessiond
 killall lttng-sessiond
index 3b6a38da43b1807e6d3dd6078028352e3a24c626..6b6f34164cf16fc160a0b8497b8c2259f42c0f27 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash -exu
+#!/bin/bash
 #
 # Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
 #               2016-2019 Michael Jeanson <mjeanson@efficios.com>
@@ -16,6 +16,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set -exu
+
 # Version compare functions
 vercomp () {
     set +u
@@ -69,6 +71,16 @@ verne() {
     [ "$res" -ne "0" ]
 }
 
+failed_configure() {
+    # Assume we are in the configured build directory
+    echo "#################### BEGIN config.log ####################"
+    cat config.log
+    echo "#################### END config.log ####################"
+
+    # End the build with failure
+    exit 1
+}
+
 # Required variables
 WORKSPACE=${WORKSPACE:-}
 
@@ -173,6 +185,10 @@ case "$arch" in
     ;;
 esac
 
+# Print build env details
+print_os || true
+print_tooling || true
+
 # Enter the source directory
 cd "$SRCDIR"
 
@@ -229,7 +245,7 @@ oot)
     builddir=$(mktemp -d)
     cd "$builddir"
 
-    "$SRCDIR/configure" "${CONF_OPTS[@]}"
+    "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 dist)
@@ -237,7 +253,7 @@ dist)
 
     # Run configure and generate the tar file
     # in the source directory
-    ./configure
+    ./configure || failed_configure
     $MAKE dist
 
     # Create and enter a temporary build directory
@@ -249,7 +265,7 @@ dist)
     $TAR xvf "$SRCDIR"/*.tar.* --strip 1
 
     # Build in extracted source tree
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 oot-dist)
@@ -260,7 +276,7 @@ oot-dist)
     cd "$builddir"
 
     # Run configure out of tree and generate the tar file
-    "$SRCDIR/configure"
+    "$SRCDIR/configure" || failed_configure
     $MAKE dist
 
     dist_srcdir="$(mktemp -d)"
@@ -276,12 +292,12 @@ oot-dist)
 
     # Run configure from the extracted distribution tar,
     # out of the source tree
-    "$dist_srcdir/configure" "${CONF_OPTS[@]}"
+    "$dist_srcdir/configure" "${CONF_OPTS[@]}" || failed_configure
     ;;
 
 *)
     echo "Standard in-tree build"
-    ./configure "${CONF_OPTS[@]}"
+    ./configure "${CONF_OPTS[@]}" || failed_configure
     ;;
 esac
 
index d4eaf2029030fae34acb84552f21f0b755aedb95..1200c04e12904f178cedf02a39a5fb69493a57d5 100755 (executable)
@@ -1,4 +1,6 @@
-#/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 yum -y install wget
 
index 61a9b685edcf1d4a00dce8aa4cac761e4a2af289..3ff08f02cb1b5e873eadaadca1676a84bf9859d5 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 yum install -y kmod-lttng-modules lttng-tools babeltrace
 
index 5949b890a1916540073be80af319c87c8b602b83..0eb38f33cc15711cd5d6fe1c7c944837dba675d2 100755 (executable)
@@ -1,4 +1,6 @@
-#/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 zypper --non-interactive addrepo https://packages.efficios.com/repo.files/EfficiOS-SLE12-x86-64.repo
 
index 12ae5add77f73dbb016a2d8df3c40a8bb3c0f6c7..fb83bf1e65c389d70c6dbb769c50ede652291b5b 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 zypper --non-interactive install lttng-modules-kmp-default lttng-tools babeltrace
 
index 344bb53c175fad65cfca1369f5f4c0ee503becd2..782f4ac252e5c02cd93596e4771aa2ade7c1d82c 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 systemctl enable lttng-relayd
 
index 3b56bccda698270005f2d9984ee6f13a70607e40..ffe51642e9928f6dd22b73450337cafb9cc2d444 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 systemctl enable lttng-sessiond
 
index c4b98898546d8700bf4a3d2eb009a3a8e63ac32d..25d432ef7b94ebae713a7178f56bc6604edbcf91 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
 
 lttng create
 lttng enable-event -a -k
This page took 0.045608 seconds and 4 git commands to generate.