diff --git a/hacking/titotest-centos-6/Dockerfile b/hacking/titotest-centos-6/Dockerfile index cb5b972..91b8505 100644 --- a/hacking/titotest-centos-6/Dockerfile +++ b/hacking/titotest-centos-6/Dockerfile @@ -9,6 +9,7 @@ MAINTAINER Paul Morgan # https://fedoraproject.org/wiki/QA/Testing_in_check # but some of the packages come from EPEL. RUN rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm +RUN rpm -Uvh http://download-ib01.fedoraproject.org/pub/epel/6/x86_64/Packages/p/python-unittest2-0.5.1-3.el6.noarch.rpm RUN yum -y install \ git \ git-annex \ diff --git a/test/functional/fetch_tests.py b/test/functional/fetch_tests.py index dc8238e..243082f 100644 --- a/test/functional/fetch_tests.py +++ b/test/functional/fetch_tests.py @@ -27,6 +27,20 @@ from tito.compat import * # NOQA from functional.fixture import TitoGitTestFixture, tito from unit import Capture + +# There is not many simple options to check on what distribution this is running. +# Fortunately, we only need to check for Fedora Rawhide and EPEL6, so we can +# determine it from python version. This is compatible for all distributions. +import sys +is_rawhide = sys.version_info[:2] >= (3, 8) +is_epel6 = sys.version_info[:2] == (2, 6) + +if is_epel6: + import unittest2 as unittest +else: + import unittest + + EXT_SRC_PKG = "extsrc" RELEASER_CONF = """ @@ -92,6 +106,9 @@ class FetchBuilderTests(TitoGitTestFixture): self.write_file(join(self.repo_dir, '.tito/releasers.conf'), RELEASER_CONF % yum_repo_dir) + # createrepo_c (0.15.5+ which is in rawhide) currently coredumps + # https://github.com/rpm-software-management/createrepo_c/issues/202 + @unittest.skipIf(is_rawhide, "Re-enable once createrepo_c #202 gets fixed") def test_with_releaser(self): yum_repo_dir = os.path.join(self.output_dir, 'yum') run_command('mkdir -p %s' % yum_repo_dir) diff --git a/test/functional/release_yum_tests.py b/test/functional/release_yum_tests.py index e77e076..4af9faa 100644 --- a/test/functional/release_yum_tests.py +++ b/test/functional/release_yum_tests.py @@ -27,6 +27,20 @@ from functional.fixture import TitoGitTestFixture, tito from tito.compat import * # NOQA from tito.common import run_command + +# There is not many simple options to check on what distribution this is running. +# Fortunately, we only need to check for Fedora Rawhide and EPEL6, so we can +# determine it from python version. This is compatible for all distributions. +import sys +is_rawhide = sys.version_info[:2] >= (3, 8) +is_epel6 = sys.version_info[:2] == (2, 6) + +if is_epel6: + import unittest2 as unittest +else: + import unittest + + PKG_NAME = "releaseme" RELEASER_CONF = """ @@ -63,6 +77,9 @@ class YumReleaserTests(TitoGitTestFixture): self.write_file(join(self.repo_dir, '.tito/releasers.conf'), RELEASER_CONF % yum_repo_dir) + # createrepo_c (0.15.5+ which is in rawhide) currently coredumps + # https://github.com/rpm-software-management/createrepo_c/issues/202 + @unittest.skipIf(is_rawhide, "Re-enable once createrepo_c #202 gets fixed") def test_with_releaser(self): yum_repo_dir = os.path.join(self.output_dir, 'yum') run_command('mkdir -p %s' % yum_repo_dir)