From 1929f7f5a0ed8b93df36bb1238e647e386ae6b5c Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Fri, 31 Jan 2020 15:45:28 +0100 Subject: [PATCH] Temporarily skip some createrepo_c tests because it coredumps This is probably not our fault, createrepo_c coredumps on Fedora rawhide, please see the upstream issue https://github.com/rpm-software-management/createrepo_c/issues/202 Once it gets resolved, revert this commit. --- hacking/titotest-centos-6/Dockerfile | 1 + test/functional/fetch_tests.py | 17 +++++++++++++++++ test/functional/release_yum_tests.py | 17 +++++++++++++++++ 3 files changed, 35 insertions(+) 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)