Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Carlos Rodriguez-Fernandez
ba057abd98
fix Source0 according to guidelines 2024-03-01 17:12:31 -07:00
Carlos Rodriguez-Fernandez
0301bff8d7
validate manpages during smoke test 2024-03-01 09:07:21 -07:00
Carlos Rodriguez-Fernandez
ae48414704
setup smoke test 2024-03-01 08:35:54 -07:00
Carlos Rodriguez-Fernandez
5f9faf4a87
Remove concurrency, add gating 2024-02-20 11:07:36 -07:00
12 changed files with 97 additions and 4 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

19
gating.yaml Normal file
View file

@ -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}

View file

@ -1,13 +1,13 @@
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
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
@ -113,5 +113,7 @@ env bmake test-tests
%doc %{_docdir}/mk-configure/examples
%changelog
* Mon Feb 19 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 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 <carlosrodrifernandez@gmail.com> - 0.38.3-1
- First release

View file

@ -23,5 +23,4 @@
export HOME=%{_tmppath}/mkcmake-home; \
mkdir -p "$HOME"; \
export MKCOMPILERSETTINGS=yes; \
%{_bindir}/mkcmake \\\
%{?_smp_mflags}
%{_bindir}/mkcmake

5
plans/main.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

2
tests/core/data/Makefile Normal file
View file

@ -0,0 +1,2 @@
PROG = main
.include <mkc.prog.mk>

11
tests/core/data/main.c Normal file
View file

@ -0,0 +1,11 @@
#include <stdio.h>
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;
}

1
tests/core/main.fmf Normal file
View file

@ -0,0 +1 @@
summary: Smoke tests

30
tests/core/test.sh Executable file
View file

@ -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

4
tests/main.fmf Normal file
View file

@ -0,0 +1,4 @@
summary: Validation tests
test: ./test.sh
framework: beakerlib
require: [mk-configure]

2
tests/manpages/main.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: verify manpages
require: [man-db]

17
tests/manpages/test.sh Executable file
View file

@ -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