-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[skip-ci] RPM/TMT: use tests subpackage #557
Draft
lsm5
wants to merge
1
commit into
containers:main
Choose a base branch
from
lsm5:rpm-tests-subpackage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,12 @@ | |
%global debug_package %{nil} | ||
%endif | ||
|
||
# Adjust/Remove after epel10 gets bats | ||
# Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2329315 | ||
%if %{defined fedora} || %{defined rhel} && 0%{?rhel} == 9 | ||
%define bats_ofc 1 | ||
%endif | ||
|
||
Name: aardvark-dns | ||
%if %{defined copr_username} | ||
Epoch: 102 | ||
|
@@ -53,6 +59,31 @@ BuildRequires: rust-srpm-macros | |
Forwards other request to configured resolvers. | ||
Read more about configuration in `src/backend/mod.rs`. | ||
|
||
# Only intended to be used for gating tests | ||
# End user usecases not supported | ||
%package tests | ||
Summary: Tests for %{name} | ||
|
||
Requires: %{name} = %{epoch}:%{version}-%{release} | ||
%if %{defined bats_ofc} | ||
Requires: bats | ||
%else | ||
Recommends: bats | ||
%endif | ||
Requires: bind-utils | ||
Requires: iptables | ||
Requires: jq | ||
Requires: make | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make doesn't seem to be needed to run as your script just calls |
||
Requires: netavark | ||
Requires: nftables | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't nftables already required by netavark? |
||
Requires: nmap-ncat | ||
Requires: dnsmasq | ||
|
||
%description tests | ||
%{summary} | ||
|
||
This package contains system tests for %{name} | ||
|
||
%prep | ||
%autosetup -Sgit %{name}-%{version} | ||
# Following steps are only required on environments like koji which have no | ||
|
@@ -78,6 +109,10 @@ tar fx %{SOURCE1} | |
%install | ||
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install | ||
|
||
%{__install} -d -p %{buildroot}%{_datadir}/%{name}/test | ||
%{__cp} -rp test/* %{buildroot}%{_datadir}/%{name}/test/ | ||
%{__rm} -rf %{buildroot}%{_datadir}/%{name}/test/tmt/ | ||
|
||
%files | ||
%license LICENSE | ||
%if (0%{?fedora} || 0%{?rhel} >= 10) && !%{defined copr_username} | ||
|
@@ -87,5 +122,8 @@ tar fx %{SOURCE1} | |
%dir %{_libexecdir}/podman | ||
%{_libexecdir}/podman/%{name} | ||
|
||
%files tests | ||
%{_datadir}/%{name}/test | ||
|
||
%changelog | ||
%autochangelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
--- !Policy | ||
product_versions: | ||
- fedora-* | ||
decision_context: bodhi_update_push_stable | ||
decision_context: | ||
- bodhi_update_push_stable | ||
- bodhi_update_push_testing | ||
subject_type: koji_build | ||
rules: | ||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} | ||
|
||
--- !Policy | ||
product_versions: | ||
- rhel-* | ||
decision_context: osci_compose_gate | ||
rules: [] | ||
rules: | ||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be part of the description? So end user have actually a chance to read it.