diff options
author | Guillaume Tucker <guillaume.tucker@collabora.com> | 2017-11-27 16:21:42 +0000 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-01-16 10:32:40 +0000 |
commit | 5c657e2ff5aed272bf4a95d576c1855e6f318b60 (patch) | |
tree | b74d19b2224f064a9d760b4c1950256bed423a4d /jenkins/bisect.jpl | |
parent | ec7b24562416b9a3584c19ada8d5ef28b0559d03 (diff) |
bisect.jpl: refactor with runTest()
Add runTest() function with common code factored out from good/bad
checks and bisection iterations to generate a LAVA job, run it and
return the result.
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r-- | jenkins/bisect.jpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl index 568a67f..6a980ee 100644 --- a/jenkins/bisect.jpl +++ b/jenkins/bisect.jpl @@ -209,6 +209,12 @@ PYTHON_EGG_CACHE=${egg_cache} \ return status } +def runTest(lava_ci, describe) { + cloneLAVA_CI(lava_ci) + submitJob(lava_ci, describe) + return getResult(lava_ci) +} + def bisectStart(kdir) { def status @@ -300,9 +306,7 @@ Bad: ${params.BAD_COMMIT}""" node("kernel-boot-v2") { timeout(time: 120, unit: 'MINUTES') { def lava_ci = env.WORKSPACE + '/lava-ci' - cloneLAVA_CI(lava_ci) - submitJob(lava_ci, describe) - def status = getResult(lava_ci) + def status = runTest(lava_ci, describe) check = (status == 0 ? true : false) } } @@ -340,9 +344,7 @@ Bad: ${params.BAD_COMMIT}""" node("kernel-boot-v2") { timeout(time: 120, unit: 'MINUTES') { def lava_ci = env.WORKSPACE + '/lava-ci' - cloneLAVA_CI(lava_ci) - submitJob(lava_ci, describe) - def status = getResult(lava_ci) + def status = runTest(lava_ci, describe) check = (status == 2 ? true : false) } } @@ -398,9 +400,7 @@ Bad: ${params.BAD_COMMIT}""" timeout(time: 120, unit: 'MINUTES') { stage("Test ${iteration}") { def lava_ci = env.WORKSPACE + '/lava-ci' - cloneLAVA_CI(lava_ci) - submitJob(lava_ci, describe) - status = getResult(lava_ci) + status = runTest(lava_ci, describe) } } } |