2 # shellcheck disable=SC2103
4 # Copyright (C) 2022 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
5 # Copyright (C) 2023 Michael Jeanson <mjeanson@efficios.com>
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 BASEDIR_64
="$WORKSPACE/deps-64/build"
23 BASEDIR_32
="$WORKSPACE/deps-32/build"
26 export CPPFLAGS
="-I$BASEDIR_64/include"
27 export LDFLAGS
="-L$BASEDIR_64/lib"
28 export CFLAGS
="-g -O0"
29 export CXXFLAGS
="-g -O0"
30 export PKG_CONFIG_PATH
="$BASEDIR_64/lib/pkgconfig"
31 export LD_LIBRARY_PATH
="$BASEDIR_64/lib:$BASEDIR_32/lib"
32 export PATH
="$PATH:$BASEDIR_64/bin"
34 export BABELTRACE_PLUGIN_PATH
="$BASEDIR_64/lib/babeltrace2/plugins/"
35 export LIBBABELTRACE2_PLUGIN_PROVIDER_DIR
="$BASEDIR_64/lib/babeltrace2/plugin-providers/"
37 export JAVA_HOME
="/usr/lib/jvm/default-java"
38 DEPS_JAVA
="$WORKSPACE/deps-64/build/share/java"
39 export CLASSPATH
="$DEPS_JAVA/lttng-ust-agent-all.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar"
41 export PYTHON2
="python2"
42 export PYTHON3
="python3"
44 if command -v $PYTHON2 >/dev
/null
2>&1; then
45 P2_VERSION
=$
($PYTHON2 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
46 DEPS_PYTHON2
="$WORKSPACE/deps/build/lib/python$P2_VERSION/site-packages"
48 PYTHON_TEST_ARG
="--enable-test-python-agent-all"
50 PYTHON_TEST_ARG
="--enable-test-python3-agent"
53 P3_VERSION
=$
($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))')
54 DEPS_PYTHON3
="$WORKSPACE/deps-64/build/lib/python$P3_VERSION/site-packages"
56 # Most build configs require access to the babeltrace 2 python bindings.
57 # This also makes the lttngust python agent available for `agents` builds.
58 export PYTHONPATH
="${DEPS_PYTHON2:-}${DEPS_PYTHON2:+:}$DEPS_PYTHON3"
60 export LTTNG_CONSUMERD32_BIN
="$BASEDIR_32/lib/lttng/libexec/lttng-consumerd"
61 export LTTNG_CONSUMERD32_LIBDIR
="$BASEDIR_32/lib"
62 export LTTNG_CONSUMERD64_BIN
="$BASEDIR_64/lib/lttng/libexec/lttng-consumerd"
63 export LTTNG_CONSUMERD64_LIBDIR
="$BASEDIR_64/lib/"
65 # Stable 2.12 and 2.13 still look for "babeltrace"
66 ln -s "$BASEDIR_64/bin/babeltrace2" "$BASEDIR_64/bin/babeltrace"
68 echo "# Setup endpoint
69 host_base = obj.internal.efficios.com
70 host_bucket = obj.internal.efficios.com
71 bucket_location = us-east-1
76 secret_key = echo123456
78 # Enable S3 v4 signature APIs
79 signature_v2 = False" > "$WORKSPACE/.s3cfg"
84 s3cmd
-c "$WORKSPACE/.s3cfg" get
"s3://jenkins/32-64-bit-integration/$ARTIFACT_ID"
85 tar -xvf "$ARTIFACT_ID"
88 cp -r artefact
/sources
/* .
/
89 cp -r artefact
/deps
/* .
/
91 pushd src
/lttng-modules
100 .
/configure
--prefix="$PREFIX" --enable-test-java-agent-all $PYTHON_TEST_ARG
103 # Deativate health test, simply because there is little value for this integration testing
104 # and because de ld_preloaded object is for both lttng-sessiond/consumer leading to difficult ld_preloading
105 # Deactivate clock plugin test since the app must load the correct biness so and the sessiond its bitness so,
106 # this is simply not feasible from outside the script. There is little value for this test in this testing context.
107 pushd src
/lttng-tools
/tests
/regression
108 sed -i '/tools\/health\/test_thread_ok/d' Makefile.am
109 sed -i '/ust\/clock-override\/test_clock_override/d' Makefile.am
112 pushd src
/lttng-tools
/
113 make -j"$(nproc)" V
=1
120 pushd src
/lttng-tools
/src
/bin
/lttng-sessiond
122 ln -s "$BASEDIR_32/bin/lttng-sessiond" lttng-sessiond
125 cp -rv "$WORKSPACE/artefact/testing-overlay/sessiond/"* .
/
128 pushd src
/lttng-tools
/src
/bin
/lttng-relayd
130 ln -s "$BASEDIR_32/bin/lttng-relayd" lttng-relayd
134 pushd src
/lttng-tools
/src
/bin
/lttng
136 ln -s "$BASEDIR_32/bin/lttng" lttng
143 pushd src
/lttng-tools
/tests
144 make --keep-going check || failed_test
=1