Skip to content
Snippets Groups Projects
Commit 2a8f26c3 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

Point the OSTree preconditions to the right branch


The templates hardcoded the `master` branch for the repositories
shipping the actual test scripts and binaries, but we use release-coded
branch names like `apertis/v2021dev2` there so the links in the
instructions pointed to the wrong place.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent ced9928a
No related branches found
No related tags found
No related merge requests found
...@@ -185,6 +185,8 @@ def get_template_values(testcase_data): ...@@ -185,6 +185,8 @@ def get_template_values(testcase_data):
# Macros variables # Macros variables
ostree_preconditions = metadata.get('macro_ostree_preconditions') ostree_preconditions = metadata.get('macro_ostree_preconditions')
if ostree_preconditions: if ostree_preconditions:
if isinstance(ostree_preconditions, str):
ostree_preconditions = { 'reponame': ostree_preconditions, 'branch': 'master' }
template_values.update({ 'ostree_preconditions' : ostree_preconditions }) template_values.update({ 'ostree_preconditions' : ostree_preconditions })
packages_list = metadata.get('macro_install_packages_preconditions') packages_list = metadata.get('macro_install_packages_preconditions')
......
...@@ -8,17 +8,17 @@ ...@@ -8,17 +8,17 @@
<p><kbd>$ ssh user@$DUT_IP</kbd></p> <p><kbd>$ ssh user@$DUT_IP</kbd></p>
{% endmacro %} {% endmacro %}
{% macro ostree_preconditions(pkgname) %} {% macro ostree_preconditions(precondition) %}
<li class="mb-sm-2">From a PC, download and unpack the test data tarball from the gitlab test repository:</li> <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/{{ pkgname }}/-/archive/master/{{ pkgname }}.tar.gz</kbd></p> <p><kbd>$ wget https://gitlab.apertis.org/tests/{{ precondition.reponame }}/-/archive/{{ precondition.branch }}/{{ precondition.reponame }}.tar.gz</kbd></p>
<p><kbd>$ tar -xvf {{ pkgname }}.tar.gz</kbd></p> <p><kbd>$ tar -xvf {{ precondition.reponame }}.tar.gz</kbd></p>
<li class="mb-sm-2">Copy the {{ pkgname }}-master-* to the target device:</li> <li class="mb-sm-2">Copy the {{ precondition.reponame }}-* folder to the target device:</li>
<p><kbd>$ DUT_IP=&ltdevice-ip&gt</kbd></p> <p><kbd>$ DUT_IP=&ltdevice-ip&gt</kbd></p>
<p><kbd>$ scp -r {{ pkgname }}-master-* user@$DUT_IP:</kbd></p> <p><kbd>$ scp -r {{ precondition.reponame }}-* user@$DUT_IP:</kbd></p>
<li class="mb-sm-2">Log into the target device:</li> <li class="mb-sm-2">Log into the target device:</li>
<p><kbd>$ ssh user@$DUT_IP</kbd></p> <p><kbd>$ ssh user@$DUT_IP</kbd></p>
<li class="mb-sm-2">After log into the DUT, enter the test directory</li> <li class="mb-sm-2">After log into the DUT, enter the test directory</li>
<p><kbd>$ cd {{ pkgname }}-master-*</kbd></p> <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> <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>
{% endmacro %} {% endmacro %}
......
...@@ -19,7 +19,9 @@ metadata: ...@@ -19,7 +19,9 @@ metadata:
- "A Bluetooth adapter." - "A Bluetooth adapter."
- "A Bluetooth device." - "A Bluetooth device."
macro_ostree_preconditions: apparmor-bluez-setup macro_ostree_preconditions:
reponame: apparmor-bluez-setup
branch: apertis/v2021dev2
pre-conditions: pre-conditions:
- "Additionnally, it is necessary to get a copy of bluez-setup test:" - "Additionnally, it is necessary to get a copy of bluez-setup test:"
- $ cd $HOME - $ cd $HOME
......
...@@ -16,7 +16,9 @@ metadata: ...@@ -16,7 +16,9 @@ metadata:
resources: resources:
- "Two Bluetooth adapters." - "Two Bluetooth adapters."
macro_ostree_preconditions: apparmor-bluez macro_ostree_preconditions:
reponame: apparmor-bluez
branch: apertis/v2021dev2
pre-conditions: pre-conditions:
- "Please note that connman disables bluetooth by default on a fresh image." - "Please note that connman disables bluetooth by default on a fresh image."
......
...@@ -21,7 +21,9 @@ metadata: ...@@ -21,7 +21,9 @@ metadata:
- "Note that you do not need to play any music on the phone; nor do you need to have - "Note that you do not need to play any music on the phone; nor do you need to have
headphones or a speaker plugged into the Apertis device." headphones or a speaker plugged into the Apertis device."
macro_ostree_preconditions: bluez-phone macro_ostree_preconditions:
reponame: bluez-phone
branch: apertis/v2021dev2
pre-conditions: pre-conditions:
- "If running the test on an SDK image, kill the blueman-applet process, as - "If running the test on an SDK image, kill the blueman-applet process, as
it prevents the test from installing its own pairing agent." it prevents the test from installing its own pairing agent."
......
...@@ -25,7 +25,9 @@ metadata: ...@@ -25,7 +25,9 @@ metadata:
new BT implementation in Android 4.2. Android 6 phones and iPhone>5 should new BT implementation in Android 4.2. Android 6 phones and iPhone>5 should
work well)" work well)"
macro_ostree_preconditions: bluez-phone macro_ostree_preconditions:
reponame: bluez-phone
branch: apertis/v2021dev2
pre-conditions: pre-conditions:
- "If running the test on an SDK image, kill the blueman-applet process, as - "If running the test on an SDK image, kill the blueman-applet process, as
it prevents the test from installing its own pairing agent." it prevents the test from installing its own pairing agent."
......
...@@ -22,7 +22,9 @@ metadata: ...@@ -22,7 +22,9 @@ metadata:
- "A Bluetooth adapter." - "A Bluetooth adapter."
- "A Bluetooth device." - "A Bluetooth device."
macro_ostree_preconditions: bluez-setup macro_ostree_preconditions:
reponame: bluez-setup
branch: apertis/v2021dev2
pre-conditions: pre-conditions:
- "Please note that connman disables bluetooth by default on a fresh image. - "Please note that connman disables bluetooth by default on a fresh image.
If it's already enabled, connmanctl will give an \"In progress\" error that If it's already enabled, connmanctl will give an \"In progress\" error that
......
...@@ -19,7 +19,9 @@ metadata: ...@@ -19,7 +19,9 @@ metadata:
- "A modem plugged into the Apertis system with a SIM card (SIM card should - "A modem plugged into the Apertis system with a SIM card (SIM card should
not have a PIN configured)." not have a PIN configured)."
macro_ostree_preconditions: ofono macro_ostree_preconditions:
reponame: ofono
branch: apertis/v2021dev2
pre-conditions: pre-conditions:
- Connect modem with SIM card into the Apertis System. - Connect modem with SIM card into the Apertis System.
- Do not connect more then one modem. - Do not connect more then one modem.
......
...@@ -15,7 +15,9 @@ metadata: ...@@ -15,7 +15,9 @@ metadata:
resources: resources:
- "A bluetooth dongle is installed." - "A bluetooth dongle is installed."
macro_ostree_preconditions: rfkill-toggle macro_ostree_preconditions:
reponame: rfkill-toggle
branch: apertis/v2021dev2
expected: expected:
- "The test script show should PASSED:" - "The test script show should PASSED:"
......
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