aboutsummaryrefslogtreecommitdiffstats
path: root/templates/tests
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2019-05-30 15:38:35 -0700
committerKevin Hilman <khilman@baylibre.com>2019-05-30 15:38:38 -0700
commit402db0b5d149c47b5f0313c1c114eeabd0950d80 (patch)
tree61ed919612cd4dfaf50205f55865a75fd887e034 /templates/tests
parent77a8ce4fcd8b26b6ff6c2a76788b5eff1d80ff97 (diff)
add tags: section, ensure tags are always lowercase
Whenever --device-tags are passed, a "tags:" section is added to the job with all of the tags passed on the command-line. To facilitate this, the device_tags list is passed directly from python to the jinja templates, and iteration is done in jinja instead of a string created in python. Also, while here, ensure that tags are always passed lower-cased. IMPORTANT: this implies that any tags in LAVA labs that are upper-case will *never* be used. Change-Id: I8f274098a69e34c32c5ed2d1c430eca0d364bcc5 Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'templates/tests')
-rw-r--r--templates/tests/ci.jinja27
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/tests/ci.jinja2 b/templates/tests/ci.jinja2
index feca60e..b5974fc 100644
--- a/templates/tests/ci.jinja2
+++ b/templates/tests/ci.jinja2
@@ -18,9 +18,12 @@
history: False
path: test-suites/short-smoke/service-check.yaml
name: service-check
+{%- if DEVICE_TAGS %}
parameters:
- DEVICE_TAGS: "{{ DEVICE_TAGS }}"
-{% if "CAN" in DEVICE_TAGS %}
+ DEVICE_TAGS: "{{ DEVICE_TAGS|join(' ')|lower }}"
+{%- endif -%}
+
+{% if "can" in DEVICE_TAGS|lower %}
{% include 'tests/can.jinja2' %}
{% endif %}