jenkins: Handle DEVICE_FILTER job param
This job parameter was added to tf-m-build-and-test and
tf-m-nightly-code-coverage jobs, and needs to be passed down to
the tf-m-lava-submit job. There, it's just used as an additional
switch to pass to the lava_create_jobs.py script. Its intended
values are "--fvp-only" or "--physical-board-only" (or empty).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I442fccabbb4e9d3d1fbf32f0d5ff6c79cc7f3d7e
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index 12b1860..6a9eff5 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -131,6 +131,7 @@
params += string(name: 'CI_SCRIPTS_BRANCH', value: env.CI_SCRIPTS_BRANCH)
params += string(name: 'LAVA_CREDENTIALS', value: env.LAVA_CREDENTIALS)
params += string(name: 'CODE_COVERAGE_EN', value: env.CODE_COVERAGE_EN)
+ params += string(name: 'DEVICE_FILTER', value: env.DEVICE_FILTER)
def lava_res = build(job: 'tf-m-lava-submit', parameters: params, propagate: false)
def lava_resubmitted = false
if (lava_res.result in failure_states) {
diff --git a/jenkins/lava-submit.jpl b/jenkins/lava-submit.jpl
index d2ed238..69fe7ad 100644
--- a/jenkins/lava-submit.jpl
+++ b/jenkins/lava-submit.jpl
@@ -41,12 +41,12 @@
}
}
stage("LAVA") {
- def device_type = ""
+ def device_type = env.DEVICE_FILTER
// For builds running per-patch (started by the tf-m-static job),
// run tests only on physical boards to improve turnaround/performance.
def upstream_job = getUpstreamJob()[0]
- if (upstream_job instanceof hudson.model.Cause.UpstreamCause) {
+ if (device_type == "" && upstream_job instanceof hudson.model.Cause.UpstreamCause) {
def gp_causes = upstream_job.getUpstreamCauses()
if (gp_causes.size() > 0 && gp_causes[0] instanceof hudson.model.Cause.UpstreamCause) {
print("Grand-parent project cause: ")