Skip to content
Snippets Groups Projects
Commit 6b2fd91e authored by Baghmar Tarun's avatar Baghmar Tarun Committed by Emanuele Aina
Browse files

Turn the OSTree preconditions into a list


If a test case requires multiple repositories it can now use a list of
objects as the OSTree preconditions to check them all out.

Signed-off-by: default avatarBaghmar Tarun <tarun.baghmar@in.bosch.com>
parent 1cfe0389
No related branches found
No related tags found
1 merge request!160Turn the OSTree preconditions into a list
Pipeline #135435 passed
......@@ -187,6 +187,8 @@ def get_template_values(testcase_data):
if ostree_preconditions:
if isinstance(ostree_preconditions, str):
ostree_preconditions = { 'reponame': ostree_preconditions, 'branch': 'master' }
if type(ostree_preconditions) is dict:
ostree_preconditions = [ostree_preconditions]
template_values.update({ 'ostree_preconditions' : ostree_preconditions })
packages_list = metadata.get('macro_install_packages_preconditions')
......
......@@ -9,6 +9,7 @@
{% endmacro %}
{% macro ostree_preconditions(precondition) %}
{% for reponame, branch in precondition %}
<li class="mb-sm-2">From a PC, download and unpack the test data tarball from the gitlab test repository:</li>
<p><kbd>$ wget https://gitlab.apertis.org/tests/{{ precondition.reponame }}/-/archive/{{ precondition.branch }}/{{ precondition.reponame }}.tar.gz</kbd></p>
<p><kbd>$ tar -xvf {{ precondition.reponame }}.tar.gz</kbd></p>
......@@ -20,6 +21,7 @@
<li class="mb-sm-2">After log into the DUT, enter the test directory</li>
<p><kbd>$ cd {{ precondition.reponame }}-*</kbd></p>
<li class="mb-sm-2">Note that the tarball may change depending on the release/branch being tested, please make sure to download the correct tarball for the release in question.</li>
{% endfor %}
{% endmacro %}
{% macro install_packages(packages_list) %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment