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
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'
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
- 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: <tng-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: <tng-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: <tng-tools_build_publishers_dev
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
-#!/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
# 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"
-#!/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
# 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
[ "$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:-}
;;
esac
+# Print build env details
+print_os || true
+print_tooling || true
+
# Enter the source directory
cd "$SRCDIR"
builddir=$(mktemp -d)
cd "$builddir"
- "$SRCDIR/configure" "${CONF_OPTS[@]}"
+ "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
;;
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
$TAR xvf "$SRCDIR"/*.tar.* --strip 1
# Build in extracted source tree
- ./configure "${CONF_OPTS[@]}"
+ ./configure "${CONF_OPTS[@]}" || failed_configure
;;
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)"
# 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
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
# Copyright (C) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
# 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
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
# 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
-#!/bin/sh -exu
+#!/bin/sh
#
# Copyright (C) 2015-2020 Michael Jeanson <mjeanson@efficios.com>
#
# 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"
-#!/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
# 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:-}
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2020 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
#
# 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
--- /dev/null
+#!/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
+}
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
# 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:-}
-#!/bin/sh -exu
+#!/bin/sh
#
# Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# Michael Jeanson <mjeanson@efficios.com>
# 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"
-#!/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
# 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
[ "$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:-}
;;
esac
+# Print build env details
+print_os || true
+print_tooling || true
+
# Enter the source directory
cd "$SRCDIR"
builddir=$(mktemp -d)
cd "$builddir"
- "$SRCDIR/configure" "${CONF_OPTS[@]}"
+ "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
;;
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
$TAR xvf "$SRCDIR"/*.tar.* --strip 1
# Build in extracted source tree
- ./configure "${CONF_OPTS[@]}"
+ ./configure "${CONF_OPTS[@]}" || failed_configure
;;
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)"
# 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
-#!/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
# 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
[ "$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:-}
;;
esac
+# Print build env details
+print_os || true
+print_tooling || true
+
# Enter the source directory
cd "$SRCDIR"
builddir=$(mktemp -d)
cd "$builddir"
- "$SRCDIR/configure" "${CONF_OPTS[@]}"
+ "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
;;
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
$TAR xvf "$SRCDIR"/*.tar.* --strip 1
# Build in extracted source tree
- ./configure "${CONF_OPTS[@]}"
+ ./configure "${CONF_OPTS[@]}" || failed_configure
;;
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)"
# 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
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
#
# 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=""
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
#
# 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"
-#!/bin/sh -exu
+#!/bin/sh
#
# Copyright (C) 2015 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# Michael Jeanson <mjeanson@efficios.com>
# 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`" ]
-#!/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
# 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:-}
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015 - Alexandre Montplaisir <alexmonthy@efficios.com>
#
# 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"
-#!/bin/bash -exu
+#!/bin/bash
# shellcheck disable=SC2103
#
# Copyright (C) 2016 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# 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
[ "$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:-}
depmod
fi
+# Print build env details
+print_os || true
+print_tooling || true
+
# Enter the source directory
cd "$SRCDIR"
builddir=$(mktemp -d)
cd "$builddir"
- "$SRCDIR/configure" "${CONF_OPTS[@]}"
+ "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
;;
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
$TAR xvf "$SRCDIR"/*.tar.* --strip 1
# Build in extracted source tree
- ./configure "${CONF_OPTS[@]}"
+ ./configure "${CONF_OPTS[@]}" || failed_configure
;;
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)"
# 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
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2018 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
#
# 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
-#!/bin/bash -exu
+#!/bin/bash
# shellcheck disable=SC2103
#
# Copyright (C) 2020 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# 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:-}
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2020 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
#
# 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:-}
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2018 - Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
#
# 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)
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
# 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
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015, Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# 2016, Michael Jeanson <mjeanson@efficios.com>
# 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
-#!/bin/bash -exu
+#!/bin/bash
+
+set -exu
# Start the lttng-sessiond
lttng-sessiond -b -vvv 1>lttng-sessiond.log 2>&1
-#!/bin/bash -exu
+#!/bin/bash
+
+set -exu
# Kill the sessiond
killall lttng-sessiond
-#!/bin/bash -exu
+#!/bin/bash
#
# Copyright (C) 2015 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
# 2016-2019 Michael Jeanson <mjeanson@efficios.com>
# 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
[ "$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:-}
;;
esac
+# Print build env details
+print_os || true
+print_tooling || true
+
# Enter the source directory
cd "$SRCDIR"
builddir=$(mktemp -d)
cd "$builddir"
- "$SRCDIR/configure" "${CONF_OPTS[@]}"
+ "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure
;;
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
$TAR xvf "$SRCDIR"/*.tar.* --strip 1
# Build in extracted source tree
- ./configure "${CONF_OPTS[@]}"
+ ./configure "${CONF_OPTS[@]}" || failed_configure
;;
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)"
# 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
-#/bin/sh -exu
+#!/bin/sh
+
+set -exu
yum -y install wget
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
yum install -y kmod-lttng-modules lttng-tools babeltrace
-#/bin/sh -exu
+#!/bin/sh
+
+set -exu
zypper --non-interactive addrepo https://packages.efficios.com/repo.files/EfficiOS-SLE12-x86-64.repo
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
zypper --non-interactive install lttng-modules-kmp-default lttng-tools babeltrace
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
systemctl enable lttng-relayd
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
systemctl enable lttng-sessiond
-#!/bin/sh -exu
+#!/bin/sh
+
+set -exu
lttng create
lttng enable-event -a -k