Skip to content

Commit

Permalink
test: add initial tmt framework support
Browse files Browse the repository at this point in the history
Add a basic tmt test plan and a simple "--help"
smoke test.

Signed-off-by: Link Dupont <[email protected]>
  • Loading branch information
subpop authored and jirihnidek committed May 20, 2024
1 parent f61b032 commit 4ed0505
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
1 change: 1 addition & 0 deletions .fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
35 changes: 33 additions & 2 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ srpm_build_deps:
- golang
- go-rpm-macros
- meson
- 'pkgconfig(dbus-1)'
- 'pkgconfig(systemd)'
- "pkgconfig(dbus-1)"
- "pkgconfig(systemd)"
- rpm-build

actions:
Expand Down Expand Up @@ -47,3 +47,34 @@ jobs:
- fedora-all
- rhel-8
- rhel-9

- job: tests
trigger: pull_request
identifier: "unit/centos-stream"
targets:
- centos-stream-8
- centos-stream-9
labels:
- unit

- job: tests
trigger: pull_request
identifier: "unit/fedora"
targets:
- fedora-all
labels:
- unit

- job: tests
trigger: pull_request
identifier: "unit/rhel"
targets:
rhel-8-x86_64:
distros:
- RHEL-8-Nightly
rhel-9-x86_64:
distros:
- RHEL-9-Nightly
labels:
- unit
use_internal_tf: true
16 changes: 16 additions & 0 deletions systemtest/plans/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
summary: In-tree yggdrasil test suite
description: |
This test plan runs yggdrasil programs directly from within the
source tree.
discover:
how: fmf

prepare:
- name: Install packages
how: install
package:
- golang
- meson

execute:
how: tmt
3 changes: 3 additions & 0 deletions systemtest/tests/help/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
summary: Run yggd --help
test: ./test.sh
duration: 30m
3 changes: 3 additions & 0 deletions systemtest/tests/help/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cd ../../..
go run ./cmd/yggd --help

0 comments on commit 4ed0505

Please sign in to comment.