From 9306ee635752a842929cb219844f97c11a310ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 5 Jan 2017 11:34:42 +0100 Subject: [PATCH 1/4] Update MANIFEST.in to include test data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running tests in tarball would fail without this. Signed-off-by: Lubomír Sedlář --- MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index b2876f36..e833ee89 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -11,4 +11,4 @@ include tests/* exclude tests/*.pyc include tests/data/* include tests/data/*/* -recursive-include tests/fixtures *.json *.xml *.bz2 *.gz *.iso *.log MD5SUM SHA1SUM SHA256SUM treeinfo +recursive-include tests/fixtures *.iso *.json *.log *.rpm *.xml *.bz2 *.gz MD5SUM SHA1SUM SHA256SUM .treeinfo From b93e0fd4ab0d1703ed0efb5f0dc30b04e27e0e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 5 Jan 2017 11:35:16 +0100 Subject: [PATCH 2/4] spec: Copy %check section from Fedora MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It runs the tests only once, runs the expensive preparation of RPMs only if unit tests succeeded and does not compute coverage (which could not be examined anyway). Signed-off-by: Lubomír Sedlář --- pungi.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pungi.spec b/pungi.spec index cb7bc394..80138108 100644 --- a/pungi.spec +++ b/pungi.spec @@ -7,7 +7,7 @@ Group: Development/Tools License: GPLv2 URL: https://fedorahosted.org/pungi Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 -BuildRequires: python-nose, python-nose-cov, python-mock +BuildRequires: python-nose, python-mock BuildRequires: python-devel, python-setuptools, python2-productmd BuildRequires: python-lockfile, kobo, kobo-rpmlib, python-kickstart, createrepo_c BuildRequires: python-lxml, libselinux-python, yum-utils, lorax @@ -86,9 +86,8 @@ rm -rf %{buildroot} %{_bindir}/%{name}-fedmsg-notification %check +nosetests --exe ./tests/data/specs/build.sh -python2 setup.py test -nosetests --exe --with-cov --cov-report html --cov-config tox.ini cd tests && ./test_compose.sh %changelog From dc19363a5cbf878c61020d72bd7d3eeb9e836cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 5 Jan 2017 11:37:07 +0100 Subject: [PATCH 3/4] unified-iso: Create work/ dir if missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In theory the directory could be deleted before generating the isos. This patch will recreate it when needed. Signed-off-by: Lubomír Sedlář --- pungi_utils/unified_isos.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pungi_utils/unified_isos.py b/pungi_utils/unified_isos.py index 938467c4..605eff56 100644 --- a/pungi_utils/unified_isos.py +++ b/pungi_utils/unified_isos.py @@ -66,6 +66,7 @@ class UnifiedISO(object): self.linker = pungi.linker.Linker() temp_topdir = os.path.abspath(os.path.join(self.compose_path, "..", "work")) + makedirs(temp_topdir) self.temp_dir = tempfile.mkdtemp(prefix="unified_isos_", dir=temp_topdir) self.treeinfo = {} # {arch/src: TreeInfo} From b25d7e7153b94cc24b33df96f67aca566a6920a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 5 Jan 2017 13:26:52 +0100 Subject: [PATCH 4/4] spec: Update upstream and source URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pungi.spec b/pungi.spec index 80138108..5a6159b0 100644 --- a/pungi.spec +++ b/pungi.spec @@ -5,8 +5,8 @@ Summary: Distribution compose tool Group: Development/Tools License: GPLv2 -URL: https://fedorahosted.org/pungi -Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 +URL: https://pagure.io/pungi +Source0: https://pagure.io/releases/%{name}/%{name}-%{version}.tar.bz2 BuildRequires: python-nose, python-mock BuildRequires: python-devel, python-setuptools, python2-productmd BuildRequires: python-lockfile, kobo, kobo-rpmlib, python-kickstart, createrepo_c