3 # Copyright (C) 2021 - Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Version compare functions
21 if [[ "$1" == "$2" ]]; then
25 local i ver1
=($1) ver2
=($2)
26 # fill empty fields in ver1 with zeros
27 for ((i
=${#ver1[@]}; i
<${#ver2[@]}; i
++)); do
30 for ((i
=0; i
<${#ver1[@]}; i
++)); do
31 if [[ -z ${ver2[i]} ]]; then
32 # fill empty fields in ver2 with zeros
35 if ((10#${ver1[i]} > 10#${ver2[i]})); then
38 if ((10#${ver1[i]} < 10#${ver2[i]})); then
47 vercomp
"$1" "$2"; local res
="$?"
48 [ "$res" -eq "0" ] ||
[ "$res" -eq "2" ]
52 vercomp
"$1" "$2"; local res
="$?"
57 vercomp
"$1" "$2"; local res
="$?"
58 [ "$res" -eq "0" ] ||
[ "$res" -eq "1" ]
62 vercomp
"$1" "$2"; local res
="$?"
67 vercomp
"$1" "$2"; local res
="$?"
74 export LTTNG_ENABLE_DESTRUCTIVE_TESTS
="will-break-my-system"
76 timeout
90m
make --keep-going check || failed_tests
=1
78 if [ -f "./tests/root_regression" ]; then
79 cd "./tests" ||
exit 1
80 prove
--nocolor --verbose --merge --exec '' - < root_regression || failed_tests
=1
84 # This script doesn't exist in master anymore, but compatibility with old branches
85 # should be retained until lttng-tools 2.13 is no longer supported
86 if [ -f "./tests/root_destructive_tests" ]; then
87 cd "./tests" ||
exit 1
88 prove
--nocolor --verbose --merge --exec '' - < root_destructive_tests || failed_tests
=2
91 echo 'root_destructive_tests not found'
94 if [[ "${failed_tests}" != "0" ]] ; then
95 find tests
/ -iname '*.trs' -print0 -or -iname '*.log' -print0 |
tar czf
/tmp
/coredump
/logs.tgz
--null -T -