description: "Run root destructive test suite"
params:
JENKINS_BUILD_ID: "invalid_jenkins_build_id"
+ LTTNG_VERSION_STRING: "invalid_version_string"
run:
steps:
- apt install -y curl
description: "Run kernel test suite"
params:
JENKINS_BUILD_ID: "invalid_jenkins_build_id"
+ LTTNG_VERSION_STRING: "invalid_version_string"
run:
steps:
- apt install -y curl
- source /root/lttngvenv/activate
- pushd /root/lttngvenv/src/lttng-tools
- lava-test-case build-test-suite --shell "make"
- - cd tests
- - lava-test-case run-tests --shell "prove --nocolor --verbose --merge --exec '' - < root_regression"
- - popd
+ - lava-test-case run-tests --shell "./ci/scripts/system-tests/run-test-suites.sh ${LTTNG_VERSION_STRING}"
- tar czf coredump.tar.gz coredump
- ./ci/lava/upload_artifact.sh coredump.tar.gz coredump.tar.gz "results/${JENKINS_BUILD_ID}/${TESTRUN_ID}-coredump.tar.gz"
description: "Run perf regression test suite"
params:
JENKINS_BUILD_ID: "invalid_jenkins_build_id"
+ LTTNG_VERSION_STRING: "invalid_version_string"
run:
steps:
- apt install -y libpfm4-dev curl
HOSTNAME = 'lava-master-02.internal.efficios.com'
OBJSTORE_URL = "https://obj.internal.efficios.com/lava/results/"
+def parse_stable_version(stable_version_string):
+ # Get the major and minor version numbers from the lttng version string.
+ version_match = re.search('stable-(\d).(\d\d)', stable_version_string)
+
+ if version_match is not None:
+ major_version = int(version_match.group(1))
+ minor_version = int(version_match.group(2))
+ else:
+ # Setting to zero to make the comparison below easier.
+ major_version = 0
+ minor_version = 0
+ return major_version, minor_version
+
class TestType:
""" Enum like for test type """
+ ' --profile lttng-ust-no-man-pages'
)
-
- # Get the major and minor version numbers from the lttng version string.
- version_match = re.search('stable-(\d).(\d\d)', lttng_version)
-
- if version_match is not None:
- major_version = int(version_match.group(1))
- minor_version = int(version_match.group(2))
- else:
- # Setting to zero to make the comparison below easier.
- major_version = 0
- minor_version = 0
+ major_version, minor_version = parse_stable_version(lttng_version)
if lttng_version == 'master' or (major_version >= 2 and minor_version >= 11):
vlttng_cmd += (
args.lttng_version, args.tools_url, args.tools_commit, args.ust_url, args.ust_commit
)
+ if args.lttng_version == "master":
+ lttng_version_string = "master"
+ else:
+ major, minor = parse_stable_version(args.lttng_version)
+ lttng_version_string = str(major) + "." + str(minor)
+
+
context = dict()
context['DeviceType'] = DeviceType
context['TestType'] = TestType
context['vlttng_cmd'] = vlttng_cmd
context['vlttng_path'] = vlttng_path
+ context['lttng_version_string'] = lttng_version_string
context['kernel_url'] = args.kernel
context['nfsrootfs_url'] = nfsrootfs
--- /dev/null
+#!/bin/bash -xeu
+#
+# Copyright (C) 2021 - Jonathan Rajotte <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
+# 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/>.
+
+# Version compare functions
+vercomp () {
+ set +u
+ if [[ "$1" == "$2" ]]; then
+ return 0
+ fi
+ local IFS=.
+ local i ver1=($1) ver2=($2)
+ # fill empty fields in ver1 with zeros
+ for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
+ ver1[i]=0
+ done
+ for ((i=0; i<${#ver1[@]}; i++)); do
+ if [[ -z ${ver2[i]} ]]; then
+ # fill empty fields in ver2 with zeros
+ ver2[i]=0
+ fi
+ if ((10#${ver1[i]} > 10#${ver2[i]})); then
+ return 1
+ fi
+ if ((10#${ver1[i]} < 10#${ver2[i]})); then
+ return 2
+ fi
+ done
+ set -u
+ return 0
+}
+
+verlte() {
+ vercomp "$1" "$2"; local res="$?"
+ [ "$res" -eq "0" ] || [ "$res" -eq "2" ]
+}
+
+verlt() {
+ vercomp "$1" "$2"; local res="$?"
+ [ "$res" -eq "2" ]
+}
+
+vergte() {
+ vercomp "$1" "$2"; local res="$?"
+ [ "$res" -eq "0" ] || [ "$res" -eq "1" ]
+}
+
+vergt() {
+ vercomp "$1" "$2"; local res="$?"
+ [ "$res" -eq "1" ]
+}
+
+verne() {
+ vercomp "$1" "$2"; local res="$?"
+ [ "$res" -ne "0" ]
+}
+
+lttng_version="$1"
+failed_tests=0
+
+if [[ "$lttng_version" == "master" ]]; then
+ make --keep-going check || failed_tests=1
+ # TODO: remove when root regression tests are merged with make check or
+ # in another make command.
+ if [ -f "./tests/long_regression" ]; then
+ cd "./tests" || exit 1
+ prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=1
+ cd ..
+ fi
+elif vergte "$lttng_version" "2.13"; then
+ # All root regression are now part of the make check
+ make --keep-going check || failed_tests=1
+else
+ make --keep-going check || failed_tests=1
+ cd "./tests" || exit 1
+ prove --nocolor --verbose --merge --exec '' - < root_regression || failed_tests=1
+ cd ..
+fi
+
+exit $failed_tests
+
+
+
path: lava/system-tests/perf-tests.yml
name: perf-tests
params:
+ LTTNG_VERSION_STRING: {{ lttng_version_string }}
JENKINS_BUILD_ID: {{ jenkins_build_id }}
{% elif test_type == TestType.kvm_tests %}
- repository: https://github.com/lttng/lttng-ci.git
path: lava/system-tests/kernel-tests.yml
name: kernel-tests
params:
+ LTTNG_VERSION_STRING: {{ lttng_version_string }}
JENKINS_BUILD_ID: {{ jenkins_build_id }}
- repository: https://github.com/lttng/lttng-ci.git
from: git
path: lava/system-tests/destructive-tests.yml
name: destructive-tests
params:
+ LTTNG_VERSION_STRING: {{ lttng_version_string }}
JENKINS_BUILD_ID: {{ jenkins_build_id }}
{% endif %}