From f14e0b41e1f75a517573161ca905b9fa59e96fb8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Wed, 12 Jun 2024 00:37:31 +0900 Subject: [PATCH] Add CI --- .fmf/version | 1 + gating.yaml | 7 +++++++ plans/test.fmf | 5 +++++ tests/main.fmt | 1 + tests/test-example/installed-tests/app1/echo.test | 5 +++++ tests/test-example/main.fmf | 6 ++++++ tests/test-example/test.sh | 10 ++++++++++ 7 files changed, 35 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/test.fmf create mode 100644 tests/main.fmt create mode 100644 tests/test-example/installed-tests/app1/echo.test create mode 100644 tests/test-example/main.fmf create mode 100755 tests/test-example/test.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..36c6463 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + # this is the testcase identifier, which OSCI pipeline uses + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/test.fmf b/plans/test.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/test.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/main.fmt b/tests/main.fmt new file mode 100644 index 0000000..e89cb45 --- /dev/null +++ b/tests/main.fmt @@ -0,0 +1 @@ +contact: Takao Fujiwara diff --git a/tests/test-example/installed-tests/app1/echo.test b/tests/test-example/installed-tests/app1/echo.test new file mode 100644 index 0000000..dbc4a35 --- /dev/null +++ b/tests/test-example/installed-tests/app1/echo.test @@ -0,0 +1,5 @@ +[Test] +Type=session +Exec=echo "Succeed" +Output=TAP + diff --git a/tests/test-example/main.fmf b/tests/test-example/main.fmf new file mode 100644 index 0000000..17f5af6 --- /dev/null +++ b/tests/test-example/main.fmf @@ -0,0 +1,6 @@ +summary: gnome-desktop-testing tests +test: ./test.sh +framework: beakerlib +require: + - git + - gnome-desktop-testing diff --git a/tests/test-example/test.sh b/tests/test-example/test.sh new file mode 100755 index 0000000..f442187 --- /dev/null +++ b/tests/test-example/test.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + rlRun "export XDG_DATA_DIRS=$PWD" + rlRun -t "gnome-desktop-testing-runner app1" 0 + rlPhaseEnd +rlJournalEnd