Add a basic unit-test runner

Let's start with something simple to test things out.
This commit is contained in:
Frantisek Sumsal 2023-07-12 10:55:20 +02:00
commit 1c33f2f4db
4 changed files with 31 additions and 0 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

View file

@ -0,0 +1,6 @@
summary: Concise summary describing what the test does
test: ./test.sh
require:
- perl-IPC-SysV
- perl-Time-HiRes
- systemd-tests

11
build/unit-tests/test.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
set -eux
set -o pipefail
if ! rpm -q systemd-tests; then
echo >&2 "Missing package 'systemd-tests'"
exit 1
fi
/usr/lib/systemd/tests/run-unit-tests.py --unsafe

13
plans/ci.fmf Normal file
View file

@ -0,0 +1,13 @@
# vi: sw=2 ts=2 et ft=yaml:
summary: systemd Fedora test suite
discover:
how: fmf
prepare:
- name: systemd
how: install
exclude:
- systemd-standalone-tmpfiles
- systemd-standalone-sysusers
execute:
how: tmt