The nbd device might not be ready after `qemu-nbd --connect` returns,
leading to access errors such as this further down:
sfdisk: cannot open /dev/nbd12: Inappropriate ioctl for device
Fix this by polling the device with `nbd-client --check <device>`.
Also, the nbd device might not be released after `qemu-nbd --disconnect`
returns. Fix this by using `nbd-client --disconnect`, which waits.
This introduces a new test dependency on nbd-client (in the ndb package
on Fedora).
34 lines
1.9 KiB
YAML
34 lines
1.9 KiB
YAML
dist: bionic
|
|
language: python
|
|
python:
|
|
- "3.7"
|
|
env:
|
|
- PYTHONUNBUFFERED=1
|
|
jobs:
|
|
include:
|
|
- name: pylint
|
|
install: pip install pylint==2.4.1
|
|
script: pylint osbuild runners/* assemblers/* stages/*
|
|
- name: unit-tests
|
|
script: python3 -m unittest test.test_osbuild
|
|
- name: rpm
|
|
before_install:
|
|
- sudo apt-get install -y rpm python3-setuptools
|
|
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python-srpm
|
|
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python
|
|
- sudo wget --directory-prefix=/usr/lib/rpm/macros.d https://src.fedoraproject.org/rpms/python-rpm-macros/raw/master/f/macros.python3
|
|
script: make rpm-nodeps
|
|
- name: pipeline-noop
|
|
before_install: sudo apt-get install -y systemd-container
|
|
script:
|
|
- sudo env "PATH=$PATH" python3 -m osbuild --libdir . --build-env samples/ubuntu1804.json samples/noop.json
|
|
- sudo env "PATH=$PATH" python3 -m osbuild --libdir . --build-env samples/ubuntu1804.json samples/noop.json
|
|
- name: f30-boot
|
|
before_install: sudo apt-get install -y systemd-container yum qemu-kvm
|
|
script: sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_ENV=samples/f27-build-from-ubuntu1804.json" python3 -m unittest -v test.test_boot
|
|
- name: assemblers
|
|
before_install: sudo apt-get install -y systemd-container yum tar qemu-utils nbd-client
|
|
script: sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_ENV=samples/f27-build-from-ubuntu1804.json" python3 -m unittest -v test.test_assemblers
|
|
- name: stage-tests
|
|
before_install: sudo apt-get install -y systemd-container yum
|
|
script: sudo env "PATH=$PATH" "OSBUILD_TEST_BUILD_ENV=samples/f27-build-from-ubuntu1804.json" python3 -m unittest -v test.test_stages
|