Commit | Line | Data |
---|---|---|
51c9c62d | 1 | #!/bin/bash |
09d45745 | 2 | # shellcheck disable=SC2103 |
b4005bbf | 3 | # |
09d45745 | 4 | # Copyright (C) 2016 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com> |
7361d941 | 5 | # Copyright (C) 2016-2020 Michael Jeanson <mjeanson@efficios.com> |
b4005bbf MJ |
6 | # |
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. | |
11 | # | |
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. | |
16 | # | |
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/>. | |
19 | ||
51c9c62d MJ |
20 | set -exu |
21 | ||
0cdaa21c | 22 | # Version compare functions |
b6e62a6a MJ |
23 | vercomp () { |
24 | set +u | |
25 | if [[ "$1" == "$2" ]]; then | |
26 | return 0 | |
27 | fi | |
28 | local IFS=. | |
29 | local i ver1=($1) ver2=($2) | |
30 | # fill empty fields in ver1 with zeros | |
31 | for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do | |
32 | ver1[i]=0 | |
33 | done | |
34 | for ((i=0; i<${#ver1[@]}; i++)); do | |
35 | if [[ -z ${ver2[i]} ]]; then | |
36 | # fill empty fields in ver2 with zeros | |
37 | ver2[i]=0 | |
38 | fi | |
39 | if ((10#${ver1[i]} > 10#${ver2[i]})); then | |
40 | return 1 | |
41 | fi | |
42 | if ((10#${ver1[i]} < 10#${ver2[i]})); then | |
43 | return 2 | |
44 | fi | |
45 | done | |
46 | set -u | |
47 | return 0 | |
48 | } | |
49 | ||
0cdaa21c | 50 | verlte() { |
b6e62a6a MJ |
51 | vercomp "$1" "$2"; local res="$?" |
52 | [ "$res" -eq "0" ] || [ "$res" -eq "2" ] | |
0cdaa21c MJ |
53 | } |
54 | ||
55 | verlt() { | |
b6e62a6a MJ |
56 | vercomp "$1" "$2"; local res="$?" |
57 | [ "$res" -eq "2" ] | |
0cdaa21c MJ |
58 | } |
59 | ||
60 | vergte() { | |
b6e62a6a MJ |
61 | vercomp "$1" "$2"; local res="$?" |
62 | [ "$res" -eq "0" ] || [ "$res" -eq "1" ] | |
0cdaa21c MJ |
63 | } |
64 | ||
65 | vergt() { | |
b6e62a6a MJ |
66 | vercomp "$1" "$2"; local res="$?" |
67 | [ "$res" -eq "1" ] | |
68 | } | |
69 | ||
70 | verne() { | |
71 | vercomp "$1" "$2"; local res="$?" | |
72 | [ "$res" -ne "0" ] | |
0cdaa21c MJ |
73 | } |
74 | ||
51c9c62d MJ |
75 | failed_configure() { |
76 | # Assume we are in the configured build directory | |
77 | echo "#################### BEGIN config.log ####################" | |
78 | cat config.log | |
79 | echo "#################### END config.log ####################" | |
80 | ||
81 | # End the build with failure | |
82 | exit 1 | |
83 | } | |
84 | ||
54c3c7ec JR |
85 | set_execute_traversal_bit() |
86 | { | |
87 | path=$1 | |
88 | ||
89 | level="$path" | |
90 | if [ ! -d "$path" ]; then | |
91 | fail "Path is not a directory" | |
92 | fi | |
93 | while level="$(dirname "$level")" | |
94 | do | |
95 | if [ "$level" = / ]; then | |
96 | break | |
97 | fi | |
98 | chmod a+x "$level" | |
99 | done | |
100 | chmod a+x "$path" | |
101 | } | |
102 | ||
09d45745 MJ |
103 | # Required variables |
104 | WORKSPACE=${WORKSPACE:-} | |
105 | ||
212d2afd MJ |
106 | arch=${arch:-} |
107 | conf=${conf:-} | |
108 | build=${build:-} | |
09d45745 | 109 | cc=${cc:-} |
9699c0e7 | 110 | test_type=${test_type:-} |
b4005bbf | 111 | |
09d45745 MJ |
112 | DEPS_INC="$WORKSPACE/deps/build/include" |
113 | DEPS_LIB="$WORKSPACE/deps/build/lib" | |
b8bdba8f | 114 | DEPS_PKGCONFIG="$DEPS_LIB/pkgconfig" |
09d45745 MJ |
115 | DEPS_BIN="$WORKSPACE/deps/build/bin" |
116 | DEPS_JAVA="$WORKSPACE/deps/build/share/java" | |
117 | ||
118 | export PATH="$DEPS_BIN:$PATH" | |
119 | export LD_LIBRARY_PATH="$DEPS_LIB:${LD_LIBRARY_PATH:-}" | |
b8bdba8f | 120 | export PKG_CONFIG_PATH="$DEPS_PKGCONFIG" |
09d45745 MJ |
121 | export CPPFLAGS="-I$DEPS_INC" |
122 | export LDFLAGS="-L$DEPS_LIB" | |
123 | ||
212d2afd | 124 | SRCDIR="$WORKSPACE/src/lttng-tools" |
212d2afd | 125 | TAPDIR="$WORKSPACE/tap" |
09d45745 | 126 | PREFIX="/build" |
212d2afd MJ |
127 | |
128 | ||
09d45745 MJ |
129 | # Create tmp directory |
130 | TMPDIR="$WORKSPACE/tmp" | |
131 | mkdir -p "$TMPDIR" | |
212d2afd | 132 | |
09d45745 MJ |
133 | # Use a symlink in /tmp to point to the the tmp directory |
134 | # inside the workspace, this is to work around the path length | |
135 | # limit of unix sockets which are created by the test suite. | |
136 | tmpdir="$(mktemp)" | |
137 | ln -sf "$TMPDIR" "$tmpdir" | |
138 | export TMPDIR="$tmpdir" | |
b4005bbf | 139 | |
481eadc8 JR |
140 | # Create a symlink to "babeltrace" when the "babeltrace2" executable is found. |
141 | # This is a temporary workaround until lttng-tools either allows the override of | |
142 | # the trace reader in its test suite or that we move to only supporting | |
143 | # babeltrace2 | |
144 | if [ -x "$DEPS_BIN/babeltrace2" ]; then | |
145 | ln -s "$DEPS_BIN/babeltrace2" "$DEPS_BIN/babeltrace" | |
146 | fi | |
147 | ||
148 | # When using babeltrace2 make sure that it finds its plugins and | |
149 | # plugin-providers. | |
150 | export BABELTRACE_PLUGIN_PATH="$DEPS_LIB/babeltrace2/plugins/" | |
151 | export LIBBABELTRACE2_PLUGIN_PROVIDER_DIR="$DEPS_LIB/babeltrace2/plugin-providers/" | |
152 | ||
09d45745 | 153 | export CFLAGS="-g -O2" |
b4005bbf | 154 | |
09d45745 MJ |
155 | # Set compiler variables |
156 | case "$cc" in | |
157 | gcc) | |
158 | export CC=gcc | |
159 | export CXX=g++ | |
160 | ;; | |
161 | gcc-4.8) | |
162 | export CC=gcc-4.8 | |
163 | export CXX=g++-4.8 | |
164 | ;; | |
165 | gcc-5) | |
166 | export CC=gcc-5 | |
167 | export CXX=g++-5 | |
168 | ;; | |
169 | gcc-6) | |
170 | export CC=gcc-6 | |
171 | export CXX=g++-6 | |
172 | ;; | |
173 | gcc-7) | |
174 | export CC=gcc-7 | |
175 | export CXX=g++-7 | |
176 | ;; | |
177 | gcc-8) | |
178 | export CC=gcc-8 | |
179 | export CXX=g++-8 | |
180 | ;; | |
181 | clang) | |
182 | export CC=clang | |
183 | export CXX=clang++ | |
184 | ;; | |
185 | clang-3.9) | |
186 | export CC=clang-3.9 | |
187 | export CXX=clang++-3.9 | |
188 | ;; | |
189 | clang-4.0) | |
190 | export CC=clang-4.0 | |
191 | export CXX=clang++-4.0 | |
192 | ;; | |
193 | clang-5.0) | |
194 | export CC=clang-5.0 | |
195 | export CXX=clang++-5.0 | |
196 | ;; | |
197 | clang-6.0) | |
198 | export CC=clang-6.0 | |
199 | export CXX=clang++-6.0 | |
200 | ;; | |
201 | clang-7) | |
202 | export CC=clang-7 | |
203 | export CXX=clang++-7 | |
204 | ;; | |
205 | *) | |
206 | if [ "x$cc" != "x" ]; then | |
207 | export CC="$cc" | |
208 | fi | |
209 | ;; | |
210 | esac | |
b4005bbf | 211 | |
09d45745 MJ |
212 | if [ "x${CC:-}" != "x" ]; then |
213 | echo "Selected compiler:" | |
214 | "$CC" -v | |
215 | fi | |
b4005bbf | 216 | |
0cdaa21c MJ |
217 | # Set platform variables |
218 | case "$arch" in | |
995ac8f2 | 219 | sol10-i386) |
09d45745 MJ |
220 | export MAKE=gmake |
221 | export TAR=gtar | |
222 | export NPROC=gnproc | |
ad11244c | 223 | export PATH="/opt/csw/bin:/usr/ccs/bin:$PATH" |
09d45745 MJ |
224 | export CPPFLAGS="-I/opt/csw/include -D_XOPEN_SOURCE=500 $CPPFLAGS" |
225 | export LDFLAGS="-L/opt/csw/lib -R/opt/csw/lib $LDFLAGS" | |
f2cd0939 | 226 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/csw/lib/pkgconfig" |
09d45745 MJ |
227 | export PYTHON="python3" |
228 | export PYTHON_CONFIG="python3-config" | |
0cdaa21c | 229 | |
0cdaa21c | 230 | RUN_TESTS="no" |
09d45745 | 231 | ;; |
0cdaa21c | 232 | |
09d45745 MJ |
233 | sol11-i386) |
234 | export MAKE=gmake | |
235 | export TAR=gtar | |
236 | export NPROC=nproc | |
f2cd0939 MJ |
237 | export PATH="/opt/csw/bin:$PATH:/usr/perl5/bin" |
238 | export CPPFLAGS="-D_XOPEN_SOURCE=500 $CPPFLAGS" | |
09d45745 MJ |
239 | export PYTHON="python3" |
240 | export PYTHON_CONFIG="python3-config" | |
f2cd0939 | 241 | export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/pkgconfig" |
09d45745 MJ |
242 | |
243 | RUN_TESTS="no" | |
0cdaa21c MJ |
244 | ;; |
245 | ||
f0d7e5b1 | 246 | macos*) |
09d45745 MJ |
247 | export MAKE=make |
248 | export TAR=tar | |
249 | export NPROC="getconf _NPROCESSORS_ONLN" | |
250 | export PATH="/opt/local/bin:/opt/local/sbin:$PATH" | |
251 | export CPPFLAGS="-I/opt/local/include $CPPFLAGS" | |
252 | export LDFLAGS="-L/opt/local/lib $LDFLAGS" | |
253 | export PYTHON="python3" | |
254 | export PYTHON_CONFIG="python3-config" | |
b6e62a6a | 255 | |
09d45745 | 256 | RUN_TESTS="no" |
b6e62a6a MJ |
257 | ;; |
258 | ||
61afb3c3 | 259 | cygwin|cygwin64|msys32|msys64) |
09d45745 MJ |
260 | export MAKE=make |
261 | export TAR=tar | |
262 | export NPROC=nproc | |
263 | ||
61afb3c3 MJ |
264 | RUN_TESTS="no" |
265 | ;; | |
266 | ||
0cdaa21c | 267 | *) |
09d45745 MJ |
268 | export MAKE=make |
269 | export TAR=tar | |
270 | export NPROC=nproc | |
271 | ||
0cdaa21c MJ |
272 | RUN_TESTS="yes" |
273 | ||
274 | PYTHON2=python2 | |
275 | PYTHON3=python3 | |
276 | ||
277 | P2_VERSION=$($PYTHON2 -c "import sys;print(sys.version[:3])") | |
278 | P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])") | |
279 | ||
09d45745 MJ |
280 | DEPS_PYTHON2="$WORKSPACE/deps/build/lib/python$P2_VERSION/site-packages" |
281 | DEPS_PYTHON3="$WORKSPACE/deps/build/lib/python$P3_VERSION/site-packages" | |
0cdaa21c MJ |
282 | ;; |
283 | esac | |
284 | ||
9699c0e7 | 285 | case "$test_type" in |
9699c0e7 | 286 | full) |
09d45745 MJ |
287 | RUN_TESTS_LONG_REGRESSION="yes" |
288 | ;; | |
9699c0e7 | 289 | *) |
09d45745 MJ |
290 | RUN_TESTS_LONG_REGRESSION="no" |
291 | ;; | |
9699c0e7 | 292 | esac |
0cdaa21c | 293 | |
7361d941 MJ |
294 | # If we have modules, build them |
295 | if [ -d "$WORKSPACE/src/lttng-modules" ]; then | |
296 | cd "$WORKSPACE/src/lttng-modules" | |
297 | $MAKE -j"$($NPROC)" V=1 | |
298 | $MAKE modules_install V=1 | |
299 | depmod | |
300 | fi | |
301 | ||
51c9c62d MJ |
302 | # Print build env details |
303 | print_os || true | |
304 | print_tooling || true | |
305 | ||
212d2afd MJ |
306 | # Enter the source directory |
307 | cd "$SRCDIR" | |
308 | ||
309 | # Run bootstrap in the source directory prior to configure | |
0cdaa21c MJ |
310 | ./bootstrap |
311 | ||
312 | # Get source version from configure script | |
212d2afd | 313 | eval "$(grep '^PACKAGE_VERSION=' ./configure)" |
09d45745 | 314 | PACKAGE_VERSION=${PACKAGE_VERSION//\-pre*/} |
0cdaa21c | 315 | |
b4005bbf | 316 | |
0cdaa21c MJ |
317 | # The switch to build without UST changed in 2.8 |
318 | if vergte "$PACKAGE_VERSION" "2.8"; then | |
319 | NO_UST="--without-lttng-ust" | |
320 | else | |
321 | NO_UST="--disable-lttng-ust" | |
322 | fi | |
b4005bbf | 323 | |
6c3ec80e | 324 | # Most build configs require the python bindings |
09d45745 | 325 | CONF_OPTS=("--prefix=$PREFIX" "--enable-python-bindings") |
6c3ec80e | 326 | |
edb933dd MJ |
327 | DIST_CONF_OPTS=() |
328 | ||
09d45745 MJ |
329 | # Set configure options and environment variables for each build |
330 | # configuration. | |
b4005bbf | 331 | case "$conf" in |
0cdaa21c | 332 | static) |
09d45745 MJ |
333 | echo "Static lib only configuration" |
334 | ||
335 | CONF_OPTS+=("--enable-static" "--disable-shared") | |
0cdaa21c MJ |
336 | ;; |
337 | ||
0cdaa21c MJ |
338 | no-ust) |
339 | echo "Build without UST support" | |
09d45745 | 340 | CONF_OPTS+=("$NO_UST") |
edb933dd | 341 | DIST_CONF_OPTS+=("$NO_UST") |
0cdaa21c MJ |
342 | ;; |
343 | ||
67122b96 | 344 | agents) |
09d45745 MJ |
345 | echo "Java and Python agents configuration" |
346 | ||
0cdaa21c | 347 | export JAVA_HOME="/usr/lib/jvm/default-java" |
09d45745 MJ |
348 | export CLASSPATH="$DEPS_JAVA/*:/usr/share/java/*" |
349 | export PYTHONPATH="$DEPS_PYTHON2:$DEPS_PYTHON3" | |
0cdaa21c | 350 | |
09d45745 | 351 | CONF_OPTS+=("--enable-test-java-agent-all" "--enable-test-python-agent-all") |
0cdaa21c MJ |
352 | ;; |
353 | ||
354 | relayd-only) | |
09d45745 MJ |
355 | echo "Relayd only configuration" |
356 | ||
357 | CONF_OPTS=("--prefix=$PREFIX" "--disable-bin-lttng" "--disable-bin-lttng-consumerd" "--disable-bin-lttng-crash" "--disable-bin-lttng-sessiond" "--disable-extras" "--disable-man-pages" "$NO_UST") | |
0cdaa21c MJ |
358 | ;; |
359 | ||
22780fe6 JR |
360 | debug-rcu) |
361 | echo "Enable RCU sanity checks for debugging" | |
09d45745 MJ |
362 | |
363 | export CPPFLAGS="$CPPFLAGS -DDEBUG_RCU" | |
22780fe6 JR |
364 | ;; |
365 | ||
0cdaa21c | 366 | *) |
09d45745 | 367 | echo "Standard configuration" |
0cdaa21c | 368 | ;; |
b4005bbf MJ |
369 | esac |
370 | ||
371 | # Build type | |
67122b96 MJ |
372 | # oot : out-of-tree build |
373 | # dist : build via make dist | |
374 | # oot-dist: build via make dist out-of-tree | |
375 | # * : normal tree build | |
b4005bbf | 376 | # |
09d45745 MJ |
377 | # Make sure to move to the build directory and run configure |
378 | # before continuing. | |
b4005bbf | 379 | case "$build" in |
09d45745 MJ |
380 | oot) |
381 | echo "Out of tree build" | |
382 | ||
383 | # Create and enter a temporary build directory | |
384 | builddir=$(mktemp -d) | |
385 | cd "$builddir" | |
386 | ||
51c9c62d | 387 | "$SRCDIR/configure" "${CONF_OPTS[@]}" || failed_configure |
09d45745 MJ |
388 | ;; |
389 | ||
390 | dist) | |
391 | echo "Distribution in-tree build" | |
392 | ||
393 | # Run configure and generate the tar file | |
394 | # in the source directory | |
51c9c62d | 395 | ./configure "${DIST_CONF_OPTS[@]}" || failed_configure |
09d45745 MJ |
396 | $MAKE dist |
397 | ||
398 | # Create and enter a temporary build directory | |
399 | builddir=$(mktemp -d) | |
400 | cd "$builddir" | |
401 | ||
402 | # Extract the distribution tar in the build directory, | |
403 | # ignore the first directory level | |
404 | $TAR xvf "$SRCDIR"/*.tar.* --strip 1 | |
405 | ||
406 | # Build in extracted source tree | |
51c9c62d | 407 | ./configure "${CONF_OPTS[@]}" || failed_configure |
09d45745 MJ |
408 | ;; |
409 | ||
410 | oot-dist) | |
411 | echo "Distribution out of tree build" | |
412 | ||
413 | # Create and enter a temporary build directory | |
414 | builddir=$(mktemp -d) | |
415 | cd "$builddir" | |
416 | ||
417 | # Run configure out of tree and generate the tar file | |
51c9c62d | 418 | "$SRCDIR/configure" "${DIST_CONF_OPTS[@]}" || failed_configure |
09d45745 MJ |
419 | $MAKE dist |
420 | ||
421 | dist_srcdir="$(mktemp -d)" | |
422 | cd "$dist_srcdir" | |
423 | ||
424 | # Extract the distribution tar in the new source directory, | |
425 | # ignore the first directory level | |
426 | $TAR xvf "$builddir"/*.tar.* --strip 1 | |
427 | ||
428 | # Create and enter a second temporary build directory | |
429 | builddir="$(mktemp -d)" | |
430 | cd "$builddir" | |
431 | ||
432 | # Run configure from the extracted distribution tar, | |
433 | # out of the source tree | |
51c9c62d | 434 | "$dist_srcdir/configure" "${CONF_OPTS[@]}" || failed_configure |
09d45745 MJ |
435 | ;; |
436 | ||
437 | *) | |
438 | echo "Standard in-tree build" | |
51c9c62d | 439 | ./configure "${CONF_OPTS[@]}" || failed_configure |
09d45745 | 440 | ;; |
b4005bbf MJ |
441 | esac |
442 | ||
09d45745 MJ |
443 | # We are now inside a configured build directory |
444 | ||
0cdaa21c | 445 | # BUILD! |
212d2afd | 446 | $MAKE -j "$($NPROC)" V=1 |
b4005bbf | 447 | |
09d45745 MJ |
448 | # Install in the workspace |
449 | $MAKE install DESTDIR="$WORKSPACE" | |
7671741c | 450 | |
09d45745 MJ |
451 | # Run tests for all configs except 'no-ust' |
452 | failed_tests=0 | |
453 | if [ "$RUN_TESTS" = "yes" ] && [ "$conf" != "no-ust" ]; then | |
0cdaa21c MJ |
454 | # Allow core dumps |
455 | ulimit -c unlimited | |
456 | ||
a4e98cc0 JR |
457 | # Force the lttng-sessiond path to /bin/true to prevent the spawing of a |
458 | # lttng-sessiond --daemonize on "lttng create" | |
459 | export LTTNG_SESSIOND_PATH="/bin/true" | |
460 | ||
09d45745 MJ |
461 | # Run 'unit_tests', 2.8 and up has a new test suite |
462 | if vergte "$PACKAGE_VERSION" "2.8"; then | |
c1bede3c JR |
463 | # It is implied that tests depending on LTTNG_ENABLE_DESTRUCTIVE_TESTS |
464 | # only run for the root user. Note that here `destructive` means that | |
465 | # operations are performed at the host level (add user etc.) that | |
466 | # effectively modify the host. Running those tests are acceptable on our | |
467 | # CI and root jobs since we always run root tests against a `snapshot` | |
468 | # of the host. | |
469 | if [ "$(id -u)" == "0" ]; then | |
54c3c7ec JR |
470 | # Allow the traversal of all directories leading to the |
471 | # DEPS_LIBS directory to enable test app run by temp users to | |
472 | # access lttng-ust. | |
473 | set_execute_traversal_bit "$DEPS_LIB" | |
474 | # Allow `all` to interact with all deps libs. | |
475 | chmod a+rwx -R "$DEPS_LIB" | |
c1bede3c JR |
476 | export LTTNG_ENABLE_DESTRUCTIVE_TESTS="will-break-my-system" |
477 | fi | |
09d45745 MJ |
478 | make --keep-going check || failed_tests=1 |
479 | rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$TAPDIR" | |
0cdaa21c | 480 | else |
09d45745 MJ |
481 | cd tests |
482 | mkdir -p "$TAPDIR/unit" | |
483 | mkdir -p "$TAPDIR/fast_regression" | |
484 | mkdir -p "$TAPDIR/with_bindings_regression" | |
485 | prove --merge -v --exec '' - < unit_tests --archive "$TAPDIR/unit/" || failed_tests=1 | |
486 | prove --merge -v --exec '' - < fast_regression --archive "$TAPDIR/fast_regression/" || failed_tests=1 | |
487 | prove --merge -v --exec '' - < with_bindings_regression --archive "$TAPDIR/with_bindings_regression/" || failed_tests=1 | |
488 | cd .. | |
489 | fi | |
490 | ||
491 | if [ "$RUN_TESTS_LONG_REGRESSION" = "yes" ]; then | |
492 | cd tests | |
493 | mkdir -p "$TAPDIR/long_regression" | |
494 | prove --merge -v --exec '' - < long_regression --archive "$TAPDIR/long_regression/" || failed_tests=1 | |
495 | cd .. | |
0cdaa21c MJ |
496 | fi |
497 | ||
0cdaa21c | 498 | # TAP plugin is having a hard time with .yml files. |
212d2afd | 499 | find "$TAPDIR" -name "meta.yml" -exec rm -f {} \; |
09d45745 MJ |
500 | else |
501 | # The TAP plugin will fail the job if no test logs are present | |
502 | mkdir -p "$TAPDIR/no-tests" | |
503 | echo "1..1" > "$TAPDIR/no-tests/tests.log" | |
504 | echo "ok 1 - Test suite disabled" >> "$TAPDIR/no-tests/tests.log" | |
b4005bbf MJ |
505 | fi |
506 | ||
09d45745 | 507 | # Clean the build directory |
0cdaa21c | 508 | $MAKE clean |
b4005bbf | 509 | |
0cdaa21c | 510 | # Cleanup rpath in executables and shared libraries |
09d45745 MJ |
511 | find "$WORKSPACE/$PREFIX/bin" -type f -perm -0500 -exec chrpath --delete {} \; |
512 | find "$WORKSPACE/$PREFIX/lib" -name "*.so" -exec chrpath --delete {} \; | |
0cdaa21c MJ |
513 | |
514 | # Remove libtool .la files | |
09d45745 | 515 | find "$WORKSPACE/$PREFIX/lib" -name "*.la" -exec rm -f {} \; |
b4005bbf | 516 | |
09d45745 MJ |
517 | # Exit with failure if any of the tests failed |
518 | exit $failed_tests | |
95654431 MJ |
519 | |
520 | # EOF |