jjb: lava: conditionally turn on `--enable-test-sdt-uprobe`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 8 Apr 2020 14:23:12 +0000 (10:23 -0400)
committerJonathan Rajotte Julien <jonathan.rajotte-julien@efficios.com>
Wed, 8 Apr 2020 21:31:57 +0000 (17:31 -0400)
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 <francis.deslauriers@efficios.com>
jobs/system-tests.yaml
scripts/system-tests/generate-properties-master.sh
scripts/system-tests/lava2-submit.py
scripts/system-tests/run-baremetal-benchmarks.sh
scripts/system-tests/run-baremetal-tests.sh
scripts/system-tests/run-kvm-tests.sh

index b42c1399e13be9d77e66b3d7542913e6b855b9d4..b5f9d327adcd70c5796daaedb260454db790b744 100644 (file)
@@ -98,6 +98,7 @@
       - inject:
           properties-content: |
             BUILD_DEVICE=baremetal
       - inject:
           properties-content: |
             BUILD_DEVICE=baremetal
+            LTTNG_VERSION={lttngversion}
     scm:
       - git:
           url: https://github.com/lttng/lttng-ci
     scm:
       - git:
           url: https://github.com/lttng/lttng-ci
       - inject:
           properties-content: |
             BUILD_DEVICE=kvm
       - inject:
           properties-content: |
             BUILD_DEVICE=kvm
+            LTTNG_VERSION={lttngversion}
 
     scm:
       - git:
 
     scm:
       - git:
       - inject:
           properties-content: |
             BUILD_DEVICE=baremetal
       - inject:
           properties-content: |
             BUILD_DEVICE=baremetal
+            LTTNG_VERSION={lttngversion}
 
     scm:
       - git:
 
     scm:
       - git:
index b084708fe3708c0edeb7243a5ae64ada45122de9..449748f38e5a26e8fd42d9d10c15f28f12d1b8de 100644 (file)
@@ -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 "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
 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
index c61e86aaaab82d16323fafef5d79c3ca58b18bbe..9565f0c8003c088f5bac3ecdff0419ed55f31e0e 100644 (file)
@@ -18,6 +18,7 @@ import argparse
 import json
 import os
 import random
 import json
 import os
 import random
+import re
 import sys
 import time
 import xmlrpc.client
 import sys
 import time
 import xmlrpc.client
@@ -130,7 +131,7 @@ def print_test_output(server, job):
 
 
 def get_vlttng_cmd(
 
 
 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.
 ):
     """
     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'
         )
 
             + ' --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
     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)
     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)
     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(
     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()
     )
 
     context = dict()
index e623f3db54b94ee0ece6e709bbb1bf4a7fc26bf7..d90375ef16d1071b8504399549ed95579bf4cdba 100644 (file)
@@ -26,6 +26,7 @@ pip install pyyaml Jinja2
 
 python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \
                           -t baremetal-benchmarks \
 
 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" \
                           -j "$JOB_NAME" \
                           -k "$S3_URL_KERNEL_IMAGE" \
                           -lm "$S3_URL_LTTNG_MODULES" \
index f289b7179fa0e1bfb77bba0fdef9b92c5ec4cd41..5ccc781990c9f80d17ba8282210c814ac334254a 100644 (file)
@@ -27,6 +27,7 @@ pip install pyyaml Jinja2
 
 python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \
                           -t baremetal-tests \
 
 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" \
                           -j "$JOB_NAME" \
                           -k "$S3_URL_KERNEL_IMAGE" \
                           -lm "$S3_URL_LTTNG_MODULES" \
index 16fc925cd5c1f85c2c634dd08047f1fe8d68e946..657810e1648fce27fda441601088e41aa8f7e0b0 100644 (file)
@@ -26,6 +26,7 @@ pip install pyyaml Jinja2
 
 python -u "$LTTNG_CI_PATH"/scripts/system-tests/lava2-submit.py \
                           -t kvm-tests \
 
 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" \
                           -j "$JOB_NAME" \
                           -k "$S3_URL_KERNEL_IMAGE" \
                           -lm "$S3_URL_LTTNG_MODULES" \
This page took 0.025582 seconds and 4 git commands to generate.