LU-2202: Start unittests during installation or build of pungi
* added section with tests and pytest module to requires IMPORTANT - build.sh script is commented * added pyfakefs dependency * fixed little mock_open issue for runroot test * bumped version @BS-TARGET-CL8 Change-Id: I036db225646875eb610736cd26f473850a78447c
This commit is contained in:
parent
02686d7bdf
commit
41381df6a5
14
pungi.spec
14
pungi.spec
@ -1,7 +1,7 @@
|
|||||||
%{?python_enable_dependency_generator}
|
%{?python_enable_dependency_generator}
|
||||||
|
|
||||||
Name: pungi
|
Name: pungi
|
||||||
Version: 4.2.9
|
Version: 4.2.10
|
||||||
Release: 1%{?dist}.cloudlinux
|
Release: 1%{?dist}.cloudlinux
|
||||||
Summary: Distribution compose tool
|
Summary: Distribution compose tool
|
||||||
|
|
||||||
@ -10,7 +10,10 @@ URL: https://pagure.io/pungi
|
|||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
|
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-mock
|
BuildRequires: python3-mock
|
||||||
|
BuildRequires: python3-pyfakefs
|
||||||
|
BuildRequires: python3-ddt
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-productmd >= 1.23
|
BuildRequires: python3-productmd >= 1.23
|
||||||
@ -115,8 +118,12 @@ rm %{buildroot}%{_bindir}/pungi
|
|||||||
# CLOUDLINUX: We don't need fedmsg stuff
|
# CLOUDLINUX: We don't need fedmsg stuff
|
||||||
rm %{buildroot}%{_bindir}/%{name}-fedmsg-notification
|
rm %{buildroot}%{_bindir}/%{name}-fedmsg-notification
|
||||||
|
|
||||||
#%check
|
%check
|
||||||
#nosetests-3 --exe
|
python3 -m pytest
|
||||||
|
# master branch part of %check segment. Currently it doesn't work
|
||||||
|
# because of pungi-koji requirement in bash tests
|
||||||
|
#./tests/data/specs/build.sh
|
||||||
|
#cd tests && ./test_compose.sh
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING GPL
|
%license COPYING GPL
|
||||||
@ -150,6 +157,7 @@ rm %{buildroot}%{_bindir}/%{name}-fedmsg-notification
|
|||||||
%{_bindir}/%{name}-compare-depsolving
|
%{_bindir}/%{name}-compare-depsolving
|
||||||
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
%{_bindir}/%{name}-wait-for-signed-ostree-handler
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 11 2021 Stepan Oksanichenko <soksanichenko@cloudlinux.com> - 4.2.9-1
|
* Thu Feb 11 2021 Stepan Oksanichenko <soksanichenko@cloudlinux.com> - 4.2.9-1
|
||||||
- LNX-133: Create a server for building nightly builds of AlmaLinux
|
- LNX-133: Create a server for building nightly builds of AlmaLinux
|
||||||
|
@ -93,7 +93,7 @@ class Runroot(kobo.log.LoggingBase):
|
|||||||
log_file = os.path.join(log_dir, "program.log")
|
log_file = os.path.join(log_dir, "program.log")
|
||||||
try:
|
try:
|
||||||
with open(log_file) as f:
|
with open(log_file) as f:
|
||||||
for line in f:
|
for line in f.readlines():
|
||||||
if "losetup: cannot find an unused loop device" in line:
|
if "losetup: cannot find an unused loop device" in line:
|
||||||
return True
|
return True
|
||||||
if re.match("losetup: .* failed to set up loop device", line):
|
if re.match("losetup: .* failed to set up loop device", line):
|
||||||
|
2
setup.py
2
setup.py
@ -25,7 +25,7 @@ packages = sorted(packages)
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pungi",
|
name="pungi",
|
||||||
version="4.2.9",
|
version="4.2.10",
|
||||||
description="Distribution compose tool",
|
description="Distribution compose tool",
|
||||||
url="https://pagure.io/pungi",
|
url="https://pagure.io/pungi",
|
||||||
author="Dennis Gilmore",
|
author="Dennis Gilmore",
|
||||||
|
Loading…
Reference in New Issue
Block a user