From 5f9faf4a87488aeef9b0a1d0eee0cdcb566f6727 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Mon, 19 Feb 2024 09:18:21 -0700 Subject: [PATCH 1/4] Remove concurrency, add gating --- gating.yaml | 19 +++++++++++++++++++ mk-configure.spec | 4 +++- mkcmake.macros | 3 +-- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..fefdc9f --- /dev/null +++ b/gating.yaml @@ -0,0 +1,19 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_testing +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/mk-configure.spec b/mk-configure.spec index 7efa6f4..dc7823b 100644 --- a/mk-configure.spec +++ b/mk-configure.spec @@ -1,6 +1,6 @@ Name: mk-configure Version: 0.38.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A build system on top of bmake License: BSD-2-Clause AND BSD-4-Clause AND ISC # Licenses listed in the doc/LICENSE file @@ -113,5 +113,7 @@ env bmake test-tests %doc %{_docdir}/mk-configure/examples %changelog +* Mon Feb 19 2024 Carlos Rodriguez-Fernandez - 0.38.3-2 +- Remove concurrency in macro call because it is not well supported due to output redirects * Sat Jan 6 2024 Carlos Rodriguez-Fernandez - 0.38.3-1 - First release diff --git a/mkcmake.macros b/mkcmake.macros index afece0d..af63908 100644 --- a/mkcmake.macros +++ b/mkcmake.macros @@ -23,5 +23,4 @@ export HOME=%{_tmppath}/mkcmake-home; \ mkdir -p "$HOME"; \ export MKCOMPILERSETTINGS=yes; \ - %{_bindir}/mkcmake \\\ - %{?_smp_mflags} + %{_bindir}/mkcmake From ae4841470492f35566a175f2e48b54dd484cd559 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 1 Mar 2024 08:35:54 -0700 Subject: [PATCH 2/4] setup smoke test --- .fmf/version | 1 + plans/main.fmf | 5 +++++ tests/data/Makefile | 2 ++ tests/data/main.c | 11 +++++++++++ tests/main.fmf | 3 +++ tests/test.sh | 30 ++++++++++++++++++++++++++++++ 6 files changed, 52 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/main.fmf create mode 100644 tests/data/Makefile create mode 100644 tests/data/main.c create mode 100644 tests/main.fmf create mode 100755 tests/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/plans/main.fmf b/plans/main.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/main.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/data/Makefile b/tests/data/Makefile new file mode 100644 index 0000000..ff5f444 --- /dev/null +++ b/tests/data/Makefile @@ -0,0 +1,2 @@ +PROG = main +.include diff --git a/tests/data/main.c b/tests/data/main.c new file mode 100644 index 0000000..e7c0d9b --- /dev/null +++ b/tests/data/main.c @@ -0,0 +1,11 @@ +#include + +int sum(int a, int b) { + return a + b; +} + +int main(int argc, char **argv) +{ + printf("2+2=%d\n", sum(2, 2)); + return 0; +} diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..d9be169 --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,3 @@ +summary: Smoke test +test: ./test.sh +framework: beakerlib diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 0000000..b22f59a --- /dev/null +++ b/tests/test.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "pushd data" + rlPhaseEnd + + rlPhaseStartTest + rlRun "mkc_compiler_settings" + rlPhaseEnd + + rlPhaseStartTest + rlRun "mkcmake" + rlPhaseEnd + + rlPhaseStartTest + rlRun "./main" + rlPhaseEnd + + rlPhaseStartTest + rlRun "mkcmake clean" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun 'rm -f _mkc*' + rlRun "popd" + rlPhaseEnd +rlJournalEnd From 0301bff8d7a60dbfda083abef0f766cf025ae13a Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 1 Mar 2024 09:06:03 -0700 Subject: [PATCH 3/4] validate manpages during smoke test --- tests/{ => core}/data/Makefile | 0 tests/{ => core}/data/main.c | 0 tests/core/main.fmf | 1 + tests/{ => core}/test.sh | 0 tests/main.fmf | 3 ++- tests/manpages/main.fmf | 2 ++ tests/manpages/test.sh | 17 +++++++++++++++++ 7 files changed, 22 insertions(+), 1 deletion(-) rename tests/{ => core}/data/Makefile (100%) rename tests/{ => core}/data/main.c (100%) create mode 100644 tests/core/main.fmf rename tests/{ => core}/test.sh (100%) create mode 100644 tests/manpages/main.fmf create mode 100755 tests/manpages/test.sh diff --git a/tests/data/Makefile b/tests/core/data/Makefile similarity index 100% rename from tests/data/Makefile rename to tests/core/data/Makefile diff --git a/tests/data/main.c b/tests/core/data/main.c similarity index 100% rename from tests/data/main.c rename to tests/core/data/main.c diff --git a/tests/core/main.fmf b/tests/core/main.fmf new file mode 100644 index 0000000..22e38d1 --- /dev/null +++ b/tests/core/main.fmf @@ -0,0 +1 @@ +summary: Smoke tests diff --git a/tests/test.sh b/tests/core/test.sh similarity index 100% rename from tests/test.sh rename to tests/core/test.sh diff --git a/tests/main.fmf b/tests/main.fmf index d9be169..ca878e7 100644 --- a/tests/main.fmf +++ b/tests/main.fmf @@ -1,3 +1,4 @@ -summary: Smoke test +summary: Validation tests test: ./test.sh framework: beakerlib +require: [mk-configure] diff --git a/tests/manpages/main.fmf b/tests/manpages/main.fmf new file mode 100644 index 0000000..3ee823e --- /dev/null +++ b/tests/manpages/main.fmf @@ -0,0 +1,2 @@ +summary: verify manpages +require: [man-db] diff --git a/tests/manpages/test.sh b/tests/manpages/test.sh new file mode 100755 index 0000000..88a1cd0 --- /dev/null +++ b/tests/manpages/test.sh @@ -0,0 +1,17 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +expected_manpages=( + 'mkc_compiler_settings(1)' + 'mkc_install(1)' + 'mkcmake(1)' + 'mk-configure(7)' +) + +rlJournalStart + for page in "${expected_manpages[@]}"; do + rlPhaseStartTest "test ${page}" + rlRun "man --pager=cat '${page}'" + rlPhaseEnd + done +rlJournalEnd From ba057abd98a9b5adc5a507cd6ed1a97bde3cf5d6 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez-Fernandez Date: Fri, 1 Mar 2024 17:12:31 -0700 Subject: [PATCH 4/4] fix Source0 according to guidelines --- mk-configure.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk-configure.spec b/mk-configure.spec index dc7823b..7921cbd 100644 --- a/mk-configure.spec +++ b/mk-configure.spec @@ -7,7 +7,7 @@ License: BSD-2-Clause AND BSD-4-Clause AND ISC URL: https://github.com/cheusov/mk-configure/ -Source0: https://github.com/cheusov/mk-configure/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/cheusov/mk-configure/archive/%{version}/%{name}-%{version}.tar.gz Source1: mkcmake.macros Patch0: 0001-ignore-incompatible-pointer-types-errors.patch