spec: don't push tests into Fedora
koji-osbuild-tests is dependent on osbuild-composer-tests but this package is not shipped into Fedora because it provides zero value to users. Let's do the same for koji-osbuild. koji-osbuild-tests will be built only in our upstream CI but not built in the official Koji.
This commit is contained in:
parent
039fc6b618
commit
5575282ab3
2 changed files with 13 additions and 0 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
# Do not build with tests by default
|
||||||
|
# Pass --with tests to rpmbuild to override
|
||||||
|
%bcond_with tests
|
||||||
|
|
||||||
%global forgeurl https://github.com/osbuild/koji-osbuild
|
%global forgeurl https://github.com/osbuild/koji-osbuild
|
||||||
|
|
||||||
Name: koji-osbuild
|
Name: koji-osbuild
|
||||||
|
|
@ -63,6 +67,8 @@ install -d %{buildroot}%{python3_sitelib}/koji_cli_plugins
|
||||||
install -p -m 0644 plugins/cli/osbuild.py %{buildroot}%{python3_sitelib}/koji_cli_plugins/osbuild.py
|
install -p -m 0644 plugins/cli/osbuild.py %{buildroot}%{python3_sitelib}/koji_cli_plugins/osbuild.py
|
||||||
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/koji_cli_plugins/osbuild.py
|
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/koji_cli_plugins/osbuild.py
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
# Tests
|
# Tests
|
||||||
install -m 0755 -vd %{buildroot}/%{_libexecdir}/tests/%{name}
|
install -m 0755 -vd %{buildroot}/%{_libexecdir}/tests/%{name}
|
||||||
install -m 0755 -vp test/integration.sh %{buildroot}/%{_libexecdir}/tests/%{name}/
|
install -m 0755 -vp test/integration.sh %{buildroot}/%{_libexecdir}/tests/%{name}/
|
||||||
|
|
@ -107,6 +113,8 @@ install -m 0755 -vp test/container/hub/web.conf %{buildroot}/%{_
|
||||||
install -m 0755 -vd %{buildroot}/%{_datadir}/%{name}-tests/container/hub/plugin
|
install -m 0755 -vd %{buildroot}/%{_datadir}/%{name}-tests/container/hub/plugin
|
||||||
install -m 0755 -vp test/container/hub/plugin/osbuild.py %{buildroot}/%{_datadir}/%{name}-tests/container/hub/
|
install -m 0755 -vp test/container/hub/plugin/osbuild.py %{buildroot}/%{_datadir}/%{name}-tests/container/hub/
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
|
@ -123,6 +131,8 @@ install -m 0755 -vp test/container/hub/plugin/osbuild.py %{buildroot}/%{_
|
||||||
%{python3_sitelib}/koji_cli_plugins/osbuild.py
|
%{python3_sitelib}/koji_cli_plugins/osbuild.py
|
||||||
%{python3_sitelib}/koji_cli_plugins/__pycache__/osbuild.*
|
%{python3_sitelib}/koji_cli_plugins/__pycache__/osbuild.*
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
|
|
||||||
%package tests
|
%package tests
|
||||||
Summary: Integration tests for koji-osbuild
|
Summary: Integration tests for koji-osbuild
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
@ -151,6 +161,8 @@ Integration tests for koji-osbuild. To be run on a dedicated system.
|
||||||
%{_libexecdir}/%{name}-tests
|
%{_libexecdir}/%{name}-tests
|
||||||
%{_datadir}/%{name}-tests
|
%{_datadir}/%{name}-tests
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
# the changelog is distribution-specific, therefore there's just one entry
|
# the changelog is distribution-specific, therefore there's just one entry
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ sudo mock -v -r "$MOCK_CONFIG" --buildsrpm \
|
||||||
greenprint "🎁 Building RPMs"
|
greenprint "🎁 Building RPMs"
|
||||||
sudo mock -v -r $MOCK_CONFIG \
|
sudo mock -v -r $MOCK_CONFIG \
|
||||||
--define "commit ${GIT_SHA}" \
|
--define "commit ${GIT_SHA}" \
|
||||||
|
--with=tests \
|
||||||
--resultdir $REPO_DIR \
|
--resultdir $REPO_DIR \
|
||||||
srpm/*.src.rpm
|
srpm/*.src.rpm
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue