From: Francis Deslauriers Date: Wed, 8 Apr 2020 14:23:12 +0000 (-0400) Subject: jjb: lava: conditionally turn on `--enable-test-sdt-uprobe` X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9356eef7b98f46b660b982b02d303fd4744f57ef;p=lttng-ci.git jjb: lava: conditionally turn on `--enable-test-sdt-uprobe` This flag is explicitly turned on so to fail if the feature dependencies (`sdt.h` and `dtrace(1)`) are missing. This is to avoid the case where the feature and its tests are silently turned off when these are missing. This flag is turned on when the LTTng version being tested is "master" or "stable-2.11", and "stable-2.12" because only those versions have this configure flag. Signed-off-by: Francis Deslauriers --- diff --git a/jobs/system-tests.yaml b/jobs/system-tests.yaml index b42c139..b5f9d32 100644 --- a/jobs/system-tests.yaml +++ b/jobs/system-tests.yaml @@ -98,6 +98,7 @@ - inject: properties-content: | BUILD_DEVICE=baremetal + LTTNG_VERSION={lttngversion} scm: - git: url: https://github.com/lttng/lttng-ci @@ -157,6 +158,7 @@ - inject: properties-content: | BUILD_DEVICE=kvm + LTTNG_VERSION={lttngversion} scm: - git: @@ -208,6 +210,7 @@ - inject: properties-content: | BUILD_DEVICE=baremetal + LTTNG_VERSION={lttngversion} scm: - git: diff --git a/scripts/system-tests/generate-properties-master.sh b/scripts/system-tests/generate-properties-master.sh index b084708..449748f 100644 --- a/scripts/system-tests/generate-properties-master.sh +++ b/scripts/system-tests/generate-properties-master.sh @@ -45,6 +45,7 @@ echo "STORAGE_HOST=storage.internal.efficios.com" >> properties.txt echo "STORAGE_USER=jenkins-lava" >> properties.txt echo "BUILD_DEVICE=$BUILD_DEVICE" >> properties.txt +echo "LTTNG_VERSION=$LTTNG_VERSION" >> properties.txt echo "KGITREPO=$KERNEL_REPO" >> properties.txt echo "LTTNG_MODULES_REPO=$LTTNG_MODULES_REPO" >> properties.txt echo "STORAGE_KERNEL_FOLDER=$BASE_STORAGE_FOLDER/kernel" >> properties.txt diff --git a/scripts/system-tests/lava2-submit.py b/scripts/system-tests/lava2-submit.py index c61e86a..9565f0c 100644 --- a/scripts/system-tests/lava2-submit.py +++ b/scripts/system-tests/lava2-submit.py @@ -18,6 +18,7 @@ import argparse import json import os import random +import re import sys import time import xmlrpc.client @@ -130,7 +131,7 @@ def print_test_output(server, job): def get_vlttng_cmd( - lttng_tools_url, lttng_tools_commit, lttng_ust_url=None, lttng_ust_commit=None + lttng_version, lttng_tools_url, lttng_tools_commit, lttng_ust_url=None, lttng_ust_commit=None ): """ Return vlttng cmd to be used in the job template for setup. @@ -160,6 +161,23 @@ def get_vlttng_cmd( + ' --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 + + if lttng_version == 'master' or (major_version >= 2 and minor_version >= 11): + vlttng_cmd += ( + ' --override projects.lttng-tools.configure+=--enable-test-sdt-uprobe' + ) + vlttng_path = '/tmp/virtenv' vlttng_cmd += ' ' + vlttng_path @@ -172,6 +190,7 @@ def main(): test_type = None parser = argparse.ArgumentParser(description='Launch baremetal test using Lava') parser.add_argument('-t', '--type', required=True) + parser.add_argument('-lv', '--lttng-version', required=True) parser.add_argument('-j', '--jobname', required=True) parser.add_argument('-k', '--kernel', required=True) parser.add_argument('-lm', '--lmodule', required=True) @@ -215,7 +234,7 @@ def main(): vlttng_path = '/tmp/virtenv' vlttng_cmd = get_vlttng_cmd( - args.tools_url, args.tools_commit, args.ust_url, args.ust_commit + args.lttng_version, args.tools_url, args.tools_commit, args.ust_url, args.ust_commit ) context = dict() diff --git a/scripts/system-tests/run-baremetal-benchmarks.sh b/scripts/system-tests/run-baremetal-benchmarks.sh index e623f3d..d90375e 100644 --- a/scripts/system-tests/run-baremetal-benchmarks.sh +++ b/scripts/system-tests/run-baremetal-benchmarks.sh @@ -26,6 +26,7 @@ pip install pyyaml Jinja2 python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t baremetal-benchmarks \ + -lv "$LTTNG_VERSION" \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ -lm "$S3_URL_LTTNG_MODULES" \ diff --git a/scripts/system-tests/run-baremetal-tests.sh b/scripts/system-tests/run-baremetal-tests.sh index f289b71..5ccc781 100644 --- a/scripts/system-tests/run-baremetal-tests.sh +++ b/scripts/system-tests/run-baremetal-tests.sh @@ -27,6 +27,7 @@ pip install pyyaml Jinja2 python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t baremetal-tests \ + -lv "$LTTNG_VERSION" \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ -lm "$S3_URL_LTTNG_MODULES" \ diff --git a/scripts/system-tests/run-kvm-tests.sh b/scripts/system-tests/run-kvm-tests.sh index 16fc925..657810e 100644 --- a/scripts/system-tests/run-kvm-tests.sh +++ b/scripts/system-tests/run-kvm-tests.sh @@ -26,6 +26,7 @@ pip install pyyaml Jinja2 python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \ -t kvm-tests \ + -lv "$LTTNG_VERSION" \ -j "$JOB_NAME" \ -k "$S3_URL_KERNEL_IMAGE" \ -lm "$S3_URL_LTTNG_MODULES" \