Skip to content
Snippets Groups Projects
Commit 2372ac54 authored by Christopher Obbard's avatar Christopher Obbard Committed by Emanuele Aina
Browse files

image-builder: test-recipe: Check fakemachine backend


The smoke test should retrieve the backend it's running and compare it
against the requested backend.

Signed-off-by: default avatarChristopher Obbard <chris.obbard@collabora.com>
parent 802c2285
No related branches found
No related tags found
2 merge requests!155v2022dev1 ← v2022dev0 forward port: Automatic KVM/UML backend selection for Debos/Fakemachine,!93WIP: documentation-builder: Rebase on Apertis instead of Debian Buster
......@@ -2,10 +2,26 @@
{{- $mirror := or .mirror "https://repositories.apertis.org/apertis/" -}}
{{- $suite := or .suite "v2021dev1" -}}
{{- $osname := or .osname "apertis" -}}
{{- $required_backend := or .required_backend "uml" -}}
architecture: {{ $architecture }}
actions:
- action: run
description: Check fakemachine backend
label: check-fakemachine-backend
command: |
BACKEND=$(systemd-detect-virt)
# workaround for https://github.com/systemd/systemd/issues/17754
# running fakemachine in uml mode inside gitlab runner we essentially run
# uml nested under kvm; systemd-detect-virt thinks we are running on kvm
grep -qP "^vendor_id\t: User Mode Linux" /proc/cpuinfo && BACKEND="uml"
echo "detected machine backend: ${BACKEND}"
echo "required machine backend: {{ $required_backend }}"
[ "${BACKEND}" = "{{ $required_backend }}" ]
- action: debootstrap
suite: {{ $suite }}
components:
......
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