Run recipe tests using UML on GitHub actions

Running the tests on the host is a good first step; to test Debos
properly we should run inside a Fakemachine. Since GitHub actions
do not support creating nested virtual machines, use the
user-mode-linux backend in Fakemachine to create a user process
to run the tests inside of.

Since Docker autobuild does not support UML the docker-compose
file purposely does not have a suffix of `.test.yml` so that the
test will not be picked up to run on Docker autobuild.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
This commit is contained in:
Christopher Obbard
2021-07-07 16:58:10 +01:00
committed by Sjoerd Simons
parent ea8aca057e
commit c66a48d699
3 changed files with 33 additions and 0 deletions

View File

@@ -22,3 +22,8 @@ jobs:
run: |
docker-compose -f docker/recipes.test.yml \
up --build --exit-code-from=sut
- name: Run test recipes using UML backend
run: |
docker-compose -f docker/recipes-test-uml.yml \
up --build --exit-code-from=sut

View File

@@ -39,3 +39,8 @@ Run test recipes on host:
```
docker-compose -f docker/recipes.test.yml up --build --exit-code-from=sut
```
Run test recipes using UML backend:
```
docker-compose -f docker/recipes-test-uml.yml up --build --exit-code-from=sut
```

View File

@@ -0,0 +1,23 @@
version: '3.6'
services:
sut:
build:
context: ..
dockerfile: docker/Dockerfile
target: runner
volumes:
- type: bind
source: ../tests
target: /recipes
tmpfs:
- /scratch:exec
environment:
- TMP=/scratch
cap_add:
- SYS_PTRACE
security_opt:
- label:disable
working_dir: /recipes
entrypoint: ./tests.sh
command: --fakemachine-backend=uml