Add basic gating smoke test

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2025-03-14 10:05:48 +00:00
parent 34a0083431
commit d56081b2f9
5 changed files with 48 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

7
plans/main.fmf Normal file
View File

@ -0,0 +1,7 @@
summary: qemu tests
description:
Test qemu
discover:
how: fmf
execute:
how: tmt

8
tests/main.fmf Normal file
View File

@ -0,0 +1,8 @@
summary: Basic smoke test
require:
- rpm-build
- sgx-rpm-macros
/smoke:
test: ./smoke.sh

26
tests/smoke.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
set -e
function evalmacro {
name=$1
dir=$(rpmbuild --eval "%$name")
if test "$dir" == "%$name"
then
echo "$name is undefined"
exit 1
fi
if test -z "$dir"
then
echo "$name is empty"
exit 1
fi
}
evalmacro sgx_prefix
evalmacro sgx_libdir
evalmacro sgx_includedir
exit 0