From 831d43834faae0d66470ede8aa2550378d2c4ed7 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Thu, 11 Jun 2015 17:07:19 -0400 Subject: [PATCH] Fix: if no cutoff was found -1 was returned with side effect of applying not cutoff --- dsl/kernel-lttng-modules.seed.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dsl/kernel-lttng-modules.seed.groovy b/dsl/kernel-lttng-modules.seed.groovy index 3fed041..8477961 100644 --- a/dsl/kernel-lttng-modules.seed.groovy +++ b/dsl/kernel-lttng-modules.seed.groovy @@ -141,6 +141,10 @@ if ( result.exitValue() == 0 ) { // Find the version cutoff def cutoffPos = versions.findIndexOf{(it.major >= kernelTagCutOff.major) && (it.minor >= kernelTagCutOff.minor) && (it.revision >= kernelTagCutOff.revision) && (it.build >= kernelTagCutOff.build) && (it.rc >= kernelTagCutOff.rc)} + // If error set cutoff on last so no job are created + if (cutoffPos == -1) { + cutoffPos = versions.size() + } // Get last version and include only last rc def last def lastNoRcPos @@ -158,6 +162,7 @@ if ( result.exitValue() == 0 ) { String modulesPrefix = "lttng-modules" String kernelPrefix = "dsl-kernel" String separator = "-" + // Actual job creation for (int i = cutoffPos; i < versions.size() ; i++) { -- 2.34.1