From e46b652bb2788be130cce1c44bcd4f710a116d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zachar?= Date: Thu, 18 Jul 2024 18:41:16 +0200 Subject: [PATCH] Add gating and run included unit tests --- .fmf/version | 1 + gating.yaml | 6 ++++++ plans/main.fmf | 8 ++++++++ tests/unit.fmf | 20 ++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/main.fmf create mode 100644 tests/unit.fmf 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..4ca9235 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-10 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..0357309 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,8 @@ +execute: + how: tmt + +discover: + dist-git-source: true + dist-git-merge: true + how: fmf + dist-git-install-builddeps: true diff --git a/tests/unit.fmf b/tests/unit.fmf new file mode 100644 index 0000000..b2c9c13 --- /dev/null +++ b/tests/unit.fmf @@ -0,0 +1,20 @@ +test: | + cd $TMT_SOURCE_DIR + # Comment out simplecov. + for file in \ + spec/spec_helper.rb \ + test/executable/suite.rb \ + test/functional/for_redcloth.rb \ + test/functional/suite.rb \ + test/unit/suite.rb; do + sed -i "/^require 'simplecov'/ s/^/#/" "${file}" + done + export LANG=C.UTF-8 + ruby ./test/functional/suite.rb + # RedCloth is not installed and will be skipped anyway + # ruby ./test/functional/for_redcloth.rb + ruby ./test/unit/suite.rb +require: +- rubygem-coderay +tag: +- rhel-buildroot