jjb: Add lttng-modules stable-2.13 jobs
[lttng-ci.git] / scripts / system-tests / lava2-submit.py
index 536b4b126aaea6bf62dec5285f0067b6f3bb7623..7a9ed23a681bd3d028286640c457372895cff8c1 100644 (file)
@@ -31,6 +31,19 @@ USERNAME = 'lava-jenkins'
 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 """
@@ -119,7 +132,7 @@ def get_vlttng_cmd(
         'vlttng --jobs=$(nproc) --profile urcu-master'
         ' --override projects.babeltrace.build-env.PYTHON=python3'
         ' --override projects.babeltrace.build-env.PYTHON_CONFIG=python3-config'
-        ' --profile babeltrace-stable-1.4'
+        ' --profile babeltrace-stable-1.5'
         ' --profile babeltrace-python'
         ' --profile lttng-tools-master'
         ' --override projects.lttng-tools.source='
@@ -139,17 +152,7 @@ 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
+    major_version, minor_version = parse_stable_version(lttng_version)
 
     if lttng_version == 'master' or (major_version >= 2 and minor_version >= 11):
         vlttng_cmd += (
@@ -215,6 +218,15 @@ def main():
         args.lttng_version, args.tools_url, args.tools_commit, args.ust_url, args.ust_commit
     )
 
+    if args.lttng_version == "master":
+        lttng_version_string = "master"
+    elif args.lttng_version == "canary":
+        lttng_version_string = "2.10"
+    else:
+        major, minor = parse_stable_version(args.lttng_version)
+        lttng_version_string = str(major) + "." + str(minor)
+
+
     context = dict()
     context['DeviceType'] = DeviceType
     context['TestType'] = TestType
@@ -226,6 +238,7 @@ def main():
 
     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
This page took 0.024969 seconds and 4 git commands to generate.