Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tests/apertis-test-cases
  • fdanis/apertis-test-cases
  • alee/apertis-test-cases
  • Tarun.Baghmar/apertis-test-cases
  • HattihalBasavanaGowda.Chethan/apertis-test-cases
  • wlozano/apertis-test-cases
  • external.SamirKumar/apertis-test-cases
  • em/apertis-test-cases
  • Muthukumaran.Monisha/apertis-test-cases
  • M.Akshay/apertis-test-cases
  • jmassot/apertis-test-cases
  • sivakrishnaprasad-ext/apertis-test-cases
  • vignesh/apertis-test-cases
  • rafaelgarrui/apertis-test-cases
  • malikmlitat/apertis-test-cases
  • andrewsh/apertis-test-cases
16 results
Show changes
Commits on Source (583)
Showing
with 500 additions and 89 deletions
image: docker-registry.apertis.org/apertis/apertis-19.03-testcases-builder
stages:
- test
- generate
pages:
stage: deploy
variables:
osname: apertis
release: v2026dev2
image: $CI_REGISTRY/infrastructure/${osname}-docker-images/${release}-testcases-builder
include:
- /.gitlab-ci/templates-generate-tests.yml
test-renderer:
stage: test
tags:
- lightweight
script:
- python3 -m unittest discover -v
render-pages:
stage: test
tags:
- lightweight
script:
- ./atc test-cases/ -d public/ --index-page
- ./atc -d ${release}/ --index-page test-cases/
artifacts:
paths:
- public
only:
- master
- ${release}
.fixedfunction:
variables:
type: fixedfunction
.hmi:
variables:
type: hmi
.basesdk:
variables:
type: basesdk
.sdk:
variables:
type: sdk
.amd64-uefi:
variables:
architecture: amd64
board: uefi
.amd64-sdk:
variables:
architecture: amd64
board: sdk
.armhf-uboot:
variables:
architecture: armhf
board: uboot
.arm64-uboot:
variables:
architecture: arm64
board: uboot
.arm64-rpi64:
variables:
architecture: arm64
board: rpi64
.generate-tests-apt:
extends: .generate-tests
tags:
- lightweight
stage: generate
variables:
deployment: apt
image_name: ${osname}_${release}-${type}-${architecture}-${board}
osname: apertis
release: v2026dev2
base_url: https://images.apertis.org
image_path: weekly/v2026dev2
image_buildid: "fakebuildid"
.generate-tests-ostree:
extends: .generate-tests
tags:
- lightweight
stage: generate
variables:
deployment: ostree
image_name: ${osname}_ostree_${release}-${type}-${architecture}-${board}
image_bundle: ${osname}_ostree_${release}-${type}-${architecture}-${board}
osname: apertis
release: v2026dev2
base_url: https://images.apertis.org
image_path: weekly/v2026dev2
image_buildid: "fakebuildid"
# !!!
# All generate-tests-* jobs defined below are not really used,
# they are intended to test that the jobs can be generated.
# !!!
generate-tests-apt-amd64-fixedfunction-uefi:
extends:
- .generate-tests-apt
- .amd64-uefi
- .fixedfunction
generate-tests-apt-armhf-fixedfunction-uboot:
extends:
- .generate-tests-apt
- .armhf-uboot
- .fixedfunction
generate-tests-apt-arm64-fixedfunction-uboot:
extends:
- .generate-tests-apt
- .arm64-uboot
- .fixedfunction
generate-tests-apt-arm64-fixedfunction-rpi64-rpi4:
extends:
- .generate-tests-apt
- .arm64-rpi64
- .fixedfunction
generate-tests-apt-amd64-hmi-uefi:
extends:
- .generate-tests-apt
- .amd64-uefi
- .hmi
generate-tests-apt-armhf-hmi-uboot:
extends:
- .generate-tests-apt
- .armhf-uboot
- .hmi
generate-tests-apt-arm64-hmi-rpi64-rpi4:
extends:
- .generate-tests-apt
- .arm64-rpi64
- .hmi
generate-tests-apt-amd64-basesdk-sdk:
extends:
- .generate-tests-apt
- .amd64-sdk
- .basesdk
generate-tests-apt-amd64-sdk-sdk:
extends:
- .generate-tests-apt
- .amd64-sdk
- .sdk
generate-tests-ostree-amd64-fixedfunction-uefi:
extends:
- .generate-tests-ostree
- .amd64-uefi
- .fixedfunction
generate-tests-ostree-armhf-fixedfunction-uboot:
extends:
- .generate-tests-ostree
- .armhf-uboot
- .fixedfunction
generate-tests-ostree-arm64-fixedfunction-uboot:
extends:
- .generate-tests-ostree
- .arm64-uboot
- .fixedfunction
generate-tests-ostree-arm64-fixedfunction-rpi64-rpi4:
extends:
- .generate-tests-ostree
- .arm64-rpi64
- .fixedfunction
variables:
image_bundle: ${osname}_ostree_${release}-${type}-${architecture}-uboot
generate-tests-ostree-amd64-hmi-uefi:
extends:
- .generate-tests-ostree
- .amd64-uefi
- .hmi
generate-tests-ostree-arm64-hmi-rpi64-rpi4:
extends:
- .generate-tests-ostree
- .arm64-rpi64
- .hmi
variables:
image_bundle: ${osname}_ostree_${release}-${type}-${architecture}-uboot
.common-image-job-base:
image: $CI_REGISTRY/infrastructure/${OSNAME}-docker-images/${APERTIS_RELEASE}-image-builder
variables:
TEST_PATH: /tmp/tests
TEST_REPO_URL: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/tests/${OSNAME}-test-cases.git
RECIPES_PATH: /tmp/recipes
RECIPES_REPO_URL: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/infrastructure/${OSNAME}-image-recipes.git
stage: build
timeout: 2h
rules:
- when: on_success
before_script:
- JOB_GENERATOR_BRANCH=${JOB_GENERATOR_BRANCH:-${OSNAME}/${APERTIS_RELEASE}}
- git clone --depth "${GIT_DEPTH:-1}" -b "$JOB_GENERATOR_BRANCH" "${TEST_REPO_URL}" "$TEST_PATH"
- git clone --depth "${GIT_DEPTH:-1}" -b "${OSNAME}/${APERTIS_RELEASE}" "${RECIPES_REPO_URL}" "$RECIPES_PATH"
- >
"$TEST_PATH/extract-variables.py" < "$RECIPES_PATH/.gitlab-ci.yml" > image.env
- . image.env
- >
"$TEST_PATH/extract-variables.py" ".$TYPE" < "$RECIPES_PATH/.gitlab-ci.yml" > pipeline.env
- . pipeline.env
- |
if [[ ${debosarguments} =~ "-t devrootpack:" ]]
then
DEVROOT_ARCH=armhf
devroot_ospack_name="ospack_${RELEASE}-${DEVROOT_ARCH}-devroot_${BUILDID}"
wget --progress=dot:mega ${image_url_prefix_main}/daily/${RELEASE}/${BUILDID}/${DEVROOT_ARCH}/devroot/${devroot_ospack_name}.tar.gz
debosarguments="$debosarguments -t devrootpack:${devroot_ospack_name}.tar.gz"
fi
- ospack_name="ospack_${RELEASE}-${ARCH}-${TYPE}_${BUILDID}"
- wget --progress=dot:mega ${image_url_prefix_main}/daily/${RELEASE}/${BUILDID}/${ARCH}/${TYPE}/${ospack_name}.tar.gz
- local_repo_path=$PWD/package-repo/$ARCH
.image-job-base:
extends: .common-image-job-base
script:
- echo ${debosarguments}
- debos ${debosarguments}
--show-boot
-t architecture:${ARCH}
-t osname:${OSNAME}
-t mirror:${mirror}
-t type:${TYPE}
-t sbc:${SBC}
-t ospack:${ospack_name}
-t suite:$RELEASE
-t timestamp:${PIPELINE_VERSION}
-t image:${IMAGE_NAME}
-t local_repo_path:${local_repo_path}
-t extra_packages:"${BIN_PKG_LIST}"
"$RECIPES_PATH/image-${BOARD}.yaml"
- echo "BUILT_IMAGE_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/${IMAGE_NAME}.img" | tee -a build.env
artifacts:
reports:
dotenv: build.env
paths:
- '*.img.*'
expire_in: 1 day
.ostree-image-job-base:
extends: .common-image-job-base
variables:
branch: ${OSNAME}/${RELEASE}/${ARCH}-${BOARD}/${TYPE}
repo: repo-${ARCH}-${BOARD}-${TYPE}/
IMAGE_NAME: ${OSNAME}_ostree_${RELEASE}-${TYPE}-${ARCH}-${BOARD}_${BUILDID}
script:
- ostree_pull_url=${IMAGE_URL_PREFIX}/${ostree_path}
- ostree init --repo=${repo} --mode archive-z2
- echo ${debosarguments}
- debos ${debosarguments}
--show-boot
-t architecture:${ARCH}
-t osname:${OSNAME}
-t mirror:${mirror}
-t type:${TYPE}
-t sbc:${SBC}
-t board:${BOARD}
-t suite:$RELEASE
-t ospack:${ospack_name}
-t image:${IMAGE_NAME}
-t message:${RELEASE}-${TYPE}-${ARCH}-${BOARD}_${BUILDID}
-t ostree:${repo}
-t branch:${branch}
-t collection_id:${collection_id}
-t local_repo_path:${local_repo_path}
-t extra_packages:"${BIN_PKG_LIST}"
"$RECIPES_PATH/ostree-commit.yaml"
- debos ${debosarguments}
--show-boot
-t architecture:${ARCH}
-t osname:${OSNAME}
-t mirror:${mirror}
-t type:${TYPE}
-t sbc:${SBC}
-t board:$BOARD
-t ospack:${ospack_name}
-t suite:$RELEASE
-t timestamp:${PIPELINE_VERSION}
-t image:${IMAGE_NAME}
-t ostree:${repo}
-t branch:${branch}
-t local_repo_path:${local_repo_path}
-t collection_id:${collection_id}
"$RECIPES_PATH/ostree-image-${BOARD}.yaml"
- echo "BUILT_IMAGE_URL=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/artifacts/${IMAGE_NAME}.img" | tee -a build.env
artifacts:
reports:
dotenv: build.env
paths:
- '*.img.*'
- '*.commit.*'
expire_in: 1 day
######
# stage: generate tests
.generate-tests:
image: $CI_REGISTRY/infrastructure/${osname}-docker-images/${release}-image-builder
variables:
release: v2021
# images are fetched from
# {{baseurl}}/{{image_path}}/{{image_buildid}}/{{arch}}/{{type}}/{{image_name}}.img.gz
# where `arch` and `type` are derived from `profile_name`
baseurl: https://images.apertis.org
image_name: apertis_v2023dev1-minimal-amd64-uefi_v2023dev1.1
image_buildid: "v2023dev1.1"
image_path: release/v2023dev1
source_commit: $CI_COMMIT_SHA
source_job: $CI_JOB_URL
source_pipeline: $CI_PIPELINE_URL
source_project: $CI_PROJECT_URL
source_ref: $CI_COMMIT_REF_NAME
# source_wip:true means that we skip creating tasks on Phab on test
# failures, and that in general the results should not impact the overall
# health of the project
source_wip: "true"
visibility: public
script:
- env --null | sort -z | tr '\0' '\n'
- ./generate-jobs.py
-d lava/devices.yaml
--config lava/config.yaml
--release ${release}
--arch ${architecture}
--board ${board}
--osname ${osname}
--type ${type}
--date ${image_buildid}
--deployment ${deployment}
--name ${image_name}
-t "baseurl:${baseurl}"
-t "image_bundle:${image_bundle}"
-t "imgpath:${image_path}"
-t "source_commit:${source_commit}"
-t "source_job:${source_job}"
-t "source_pipeline:${source_pipeline}"
-t "source_project:${source_project}"
-t "source_ref:${source_ref}"
-t "source_wip:${source_wip}"
-t "visibility:${visibility}"
--verbose
--metadata-file metadata.json
- ./generate-test-pipeline.py
--include .gitlab-ci/test-pipeline-base.yml
--output child-pipeline.yaml
--parent-pipeline $CI_PIPELINE_ID
--current-job-name $CI_JOB_NAME
--test-job-base '.test-job-base'
job-${image_name}-*.yaml
artifacts:
paths:
- ./job-${osname}*.yaml
- ./metadata.json
- ./child-pipeline.yaml
expire_in: 1 day
rules:
- if: '$CI_MERGE_REQUEST_ID'
when: never
- when: on_success
.test-job-base:
stage: deploy
tags:
- lava-runner
artifacts:
when: always
paths:
- log.yaml
reports:
junit: "*.xml"
......@@ -22,7 +22,18 @@
###################################################################################
from atc_renderer import main
from argparse import ArgumentParser
if '__main__' == __name__:
main()
cli_parser = ArgumentParser(description="atc (Test Cases Renderer)")
cli_parser.add_argument('-i', '--index-page', action='store_true',
help="Create index page")
cli_parser.add_argument('-d', '--test-case-dir',
help="Directory path for generated test cases")
cli_parser.add_argument('yaml_files',
help="YAML file or files directory")
args = cli_parser.parse_args()
main(args.yaml_files, args.test_case_dir, args.index_page)
exit(0)
......@@ -23,7 +23,6 @@
import os
import shutil
import pkg_resources
from argparse import ArgumentParser
from atc_renderer.renderer import generate_test_case_page, \
generate_index_page, \
......@@ -44,20 +43,11 @@ def copy_files(directory, dirname, dirpath, msg):
shutil.copy2(os.path.join(dirpath, f), dst_dir)
def main():
cli_parser = ArgumentParser(description="atc (Test Cases Renderer)")
cli_parser.add_argument('-i', '--index-page', action='store_true',
help="Create index page")
cli_parser.add_argument('-d', '--test-case-dir',
help="Directory path for generated test cases")
cli_parser.add_argument('yaml_files',
help="YAML file or files directory")
args = cli_parser.parse_args()
def main(tc_files, tc_dir = None, index_page = False):
index_files = []
directory = os.getcwd()
if args.test_case_dir:
directory = args.test_case_dir
if tc_dir:
directory = tc_dir
try:
os.mkdir(directory)
except FileExistsError:
......@@ -66,18 +56,18 @@ def main():
print("Error:", e)
exit(1)
if os.path.isfile(args.yaml_files):
generate_test_case_page(args.yaml_files, directory)
if args.index_page:
index_files.append(args.yaml_files)
if os.path.isfile(tc_files):
generate_test_case_page(tc_files, directory)
if index_page:
index_files.append(tc_files)
else:
c = 0
for root, _, files in os.walk(args.yaml_files):
for root, _, files in os.walk(tc_files):
for f in files:
tc_file = os.path.join(root, f)
if os.path.isfile(tc_file):
generate_test_case_page(tc_file, directory)
if args.index_page:
if index_page:
index_files.append(tc_file)
c += 1
print("Total of test cases processed:", c)
......
File added
File added
File added
atc_renderer/images/agl-compositor-launcher1-screenshot.png

6.45 KiB

atc_renderer/images/agl-compositor-launcher2-screenshot.png

15.6 KiB

atc_renderer/images/agl-compositor-pavucontrol-screenshot.png

26.9 KiB

atc_renderer/images/agl-compositor-popup-screenshot.png

21.5 KiB

atc_renderer/images/agl-compositor-screenshot.png

5.99 KiB

atc_renderer/images/flatpak-demo-hmi-icon-screenshot.png

26.6 KiB

atc_renderer/images/flatpak-demo-hmi-screenshot.png

93.9 KiB

atc_renderer/images/video-animation-on-boot-logo.gif

4.64 MiB

......@@ -26,8 +26,8 @@ import yaml
from atc_renderer.exceptions import ParserTypeError, ParserMissingFieldError
image_types = [ "any", "development", "minimal", "SDK", "target", "tiny-lxc" ]
image_arch = ['any', 'amd64', 'arm64', 'armhf']
image_variants = [ 'any', 'fixedfunction', 'hmi', 'basesdk', 'sdk', 'tiny-lxc' ]
image_archs = ['any', 'armhf', 'arm64', 'amd64']
tests_types = ['compatibility', 'functional', 'performance', 'sanity', 'system']
priorities = ['critical', 'high', 'low', 'medium']
execution_type = ['all', 'automated', 'manual']
......@@ -35,25 +35,23 @@ execution_type = ['all', 'automated', 'manual']
# This structure defines the test case YAML file format.
test_case_format = {
'metadata': (True, {
'name': (True, ""),
'format': (False, ""),
'image-type': (True, image_types),
'image-arch': (True, image_arch),
'type': (True, tests_types),
'exec-type': (True, execution_type),
'priority': (True, priorities),
'maintainer': (False, ""),
'description': (True, ""),
'resources': (False, []),
'pre-conditions': (False, []),
'expected': (True, []),
'notes': (False, []),
'post-conditions': (False, [])
'name': (True, ""),
'format': (False, ""),
'image-types': (True, image_variants),
'image-deployment': (True, []),
'type': (True, tests_types),
'exec-type': (True, execution_type),
'priority': (True, priorities),
'maintainer': (False, ""),
'description': (True, ""),
'resources': (False, []),
'pre-conditions': (False, []),
'expected': (True, []),
'notes': (False, []),
'post-conditions': (False, [])
}),
'install': (False, {
# git-repos should be mandatory.
# TODO: Set to True once all test cases use git-repos
'git-repos' : (False, []),
'git-repos' : (True, []),
'deps': (False, [])
}),
'run': (True, {
......@@ -73,14 +71,27 @@ def _parse_format(test_case, test_case_format):
# Test case doesn't have this non-mandatory tag, so just continue.
continue
warning_msg = "Warning: value '{}' not found in {} for field '{}'\n"
if tagf == 'image-types':
if not isinstance(value, dict):
raise ParserTypeError("Incorrect type for field: " + tagf)
for img_type, img_archs in value.items():
if img_type not in image_variants:
sys.stderr.write(warning_msg.format(img_type, image_variants,\
tagf))
for e in img_archs:
if e not in image_archs:
sys.stderr.write(warning_msg.format(e, image_archs, tagf))
continue
if type(value) == str and type(valuef) == list:
if tagf in ['image-type' , 'image-arch', 'type',
'exec-type', 'priority']:
if tagf in ['type', 'exec-type', 'priority']:
try:
valuef.index(value)
except ValueError:
sys.stderr.write("Warning: value '{}' not found in '{}' for "\
"field '{}'\n".format(value, valuef, tagf))
sys.stderr.write(warning_msg.format(value, valuef, tagf))
continue
if type(value) != type(valuef):
......
......@@ -82,7 +82,6 @@ def priority_color(priority):
(priority == 'critical' and 'danger') or 'light'
def get_git_repo_dir(git_repo=None):
# TODO: Remove this `if` once all test cases use git-repos.
if git_repo:
try:
return os.path.splitext(os.path.split(git_repo)[1])[0]
......@@ -90,6 +89,16 @@ def get_git_repo_dir(git_repo=None):
print("Incorrect git-repos repository path:", git_repo)
exit(1)
def get_image_types(variants_arches):
images_types = []
for variant, arches in variants_arches.items():
images = []
for arch in arches:
images.append(variant + '-' + arch)
images_types.append(" / ".join(images))
return " / ".join(sorted(images_types))
def get_template_values(testcase_data):
template_values = {}
is_automated = False
......@@ -100,14 +109,21 @@ def get_template_values(testcase_data):
print("Error: missing mandatory field metadata")
exit(1)
for mv in ['name', 'image-type', 'image-arch', 'type',
for mv in ['name', 'image-types', 'image-deployment', 'type',
'exec-type', 'priority', 'description', 'expected']:
value = metadata.get(mv)
if value:
if mv == 'exec-type' and (value in ['all', 'automated']):
is_automated = True
if mv == 'expected':
template_values.update({ mv : parse_list(value) })
elif mv == 'image-types':
template_values.update({ mv.replace('-', '_') :
get_image_types(value) })
elif mv in ['image-deployment']:
template_values.update({ mv.replace('-', '_') :
", ".join(sorted(value)) })
else:
# Set the priority_color.
if mv == 'priority':
......@@ -133,24 +149,28 @@ def get_template_values(testcase_data):
# If the test is automated, it should always have 'install:git-repos'
install = testcase_data.get('install')
if is_automated and install:
if install:
git_repos = install.get('git-repos', [])
git_repo_url = None
git_repo_url, git_repo_branch = None, None
for gr in git_repos:
git_repo_url = gr.get('url')
git_repo_url, git_repo_branch = gr.get('url'), gr.get('branch')
if not git_repo_url:
print("Error: missing mandatory field install:git-repos:url for " \
print("Error: missing mandatory field git-repos:url")
exit(1)
if is_automated and not git_repo_branch:
print("Error: missing mandatory field git-repos:branch for " \
"automated tests")
exit(1)
template_values.update({ 'git_repo_url' : git_repo_url })
template_values.update({ 'git_repo_dir' : get_git_repo_dir(git_repo_url) })
template_values.update({ 'git_repo_branch' : git_repo_branch })
deps = install.get('deps')
if deps:
# A install.deps directive will always add a preconditions section
# to install the required packages using the macro to install packages.
template_values.update({ 'packages_list' : ' '.join(deps) })
template_values.update({ 'install_packages_preconditions' : ' '.join(deps) })
# No mandatory fields
for nm in ['notes', 'format', 'maintainer', 'resources',
......@@ -165,15 +185,19 @@ def get_template_values(testcase_data):
# Macros variables
ostree_preconditions = metadata.get('macro_ostree_preconditions')
if ostree_preconditions:
template_values.update({ 'pkgname' : 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')
if packages_list:
template_values.update({ 'packages_list' : packages_list })
template_values.update({ 'install_packages_preconditions' : packages_list })
modules_preconditions = metadata.get('macro_modules_preconditions')
if modules_preconditions:
template_values.update({ 'libname' : modules_preconditions })
template_values.update({ 'modules_preconditions' : modules_preconditions })
return template_values
......
{% macro git_repo(git_repo_url, git_repo_dir) %}
{% macro git_repo(url, dir, branch) %}
<li class="mb-sm-2">Clone the tests repository from another computer <i>(Note that the branch being tested may change depending on the release, please make sure to clone the correct branch for the release in question)</i>:</li>
<p><kbd>$ git clone {{ git_repo_url }}</kbd></p>
<li class="mb-sm-2">Copy the test directory {{ git_repo_dir }} to the device:</li>
<p><kbd>$ DUT_IP=&ltdevice-ip&gt</kbd></p>
<p><kbd>$ scp -r {{ git_repo_dir }} user@$DUT_IP:</kbd></p>
<li class="mb-sm-2">Log into the target:</li>
<p><kbd>$ ssh user@$DUT_IP</kbd></p>
<pre><code>$ git clone --branch {{ branch }} {{ url }}</code></pre>
<li class="mb-sm-2">Copy the test directory {{ dir }} to the target device:</li>
<pre><code>$ DUT_IP=&ltdevice-ip&gt</code></pre>
<pre><code>$ scp -r {{ dir }} user@$DUT_IP:</code></pre>
<li class="mb-sm-2">Log into the target device:</li>
<pre><code>$ ssh user@$DUT_IP</code></pre>
{% endmacro %}
{% macro ostree_preconditions(pkgname) %}
<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>$ tar -xvf {{ pkgname }}.tar.gz</kbd></p>
<li class="mb-sm-2">Copy the {{ pkgname }}-master-* to the device</li>
<p><kbd>$ DUT_IP=&ltdevice-ip&gt</kbd></p>
<p><kbd>$ scp -r {{ pkgname }}-master-* user@$DUT_IP:</kbd></p>
<li class="mb-sm-2">Log into the target</li>
<p><kbd>$ ssh user@$DUT_IP</kbd></p>
<li class="mb-sm-2">After log into the DUT, enter the test directory</li>
<p><kbd>$ cd {{ pkgname }}-master-*</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>
{% macro ostree_preconditions(preconditions) %}
<li class="mb-sm-2">Clone the tests repository from another computer <i>(Note that the branch being tested may change depending on the release, please make sure to clone the correct branch for the release in question)</i>:</li>
{% for precondition in preconditions %}
<pre><code>$ git clone --depth 1 --branch {{ precondition.branch }} https://gitlab.apertis.org/tests/{{ precondition.reponame }}</code></pre>
{% endfor %}
<li class="mb-sm-2">Copy the test directory to the target device:</li>
<pre><code>$ DUT_IP=&ltdevice-ip&gt</code></pre>
<pre><code>$ scp -r{% for precondition in preconditions %} {{ precondition.reponame }} {% endfor %}user@$DUT_IP:</code></pre>
<li class="mb-sm-2">Log into the target device:</li>
<pre><code>$ ssh user@$DUT_IP</code></pre>
<li class="mb-sm-2">After log into the DUT, enter the test directory, and run respective commands mentioned in the execution steps</li>
{% if preconditions|length == 1 %}
<pre><code>$ cd {{ preconditions[0].reponame }}</code></pre>
{% endif %}
{% endmacro %}
{% macro install_packages(packages_list) %}
<li class="mb-sm-2">Ensure Rootfs is remounted as read/write.</li>
<p><kbd>$ sudo mount -o remount,rw /</kbd></p>
<pre><code>$ sudo mount -o remount,rw /</code></pre>
<li class="mb-sm-2">Install dependencies</li>
<p><kbd>$ sudo apt install {{ packages_list }}</kbd></p>
<pre><code>$ sudo apt install {{ packages_list }}</code></pre>
<li class="mb-sm-2">Restart the system to restore the filesystem state to read-only before running the test.</li>
<p><kbd>$ sudo reboot</kbd></p>
<pre><code>$ sudo reboot</code></pre>
{% endmacro %}
{% macro modules_preconditions(libname) %}
<li class="mb-sm-2">Download the ribchester binary inside the /tmp directory.</li>
<p><kbd>$ cd /tmp/</kbd></p>
<p><kbd>$ apt source {{ libname }}</kbd></p>
<p><kbd>$ chown user:user -R /tmp/{{ libname }}-*</kbd></p>
<li class="mb-sm-2">Clone the apertis-tests git repository:</li>
<p><kbd>$ git clone https://gitlab.apertis.org/infrastructure/apertis-tests.git</kbd></p>
<li class="mb-sm-2">Enter the tests directory and follow the execution steps.</li>
<p><kbd>$ cd apertis-tests/</kbd></p>
<pre><code>$ cd /tmp/</code></pre>
<pre><code>$ apt source {{ libname }}</code></pre>
<pre><code>$ chown user:user -R /tmp/{{ libname }}-*</code></pre>
{% endmacro %}