From 1ff03c955e95f10303d0a2dac7a843a68eb285d1b37c4ee60c09462a284d8d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Aug 2018 10:26:44 +0000 Subject: [PATCH 1/2] - Cleanup with spec-cleaner - Simplify the tests execution - Install license files OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testresources?expand=0&rev=14 --- python-testresources.changes | 7 +++++++ python-testresources.spec | 12 +++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/python-testresources.changes b/python-testresources.changes index 108c1ff..402fa2c 100644 --- a/python-testresources.changes +++ b/python-testresources.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 7 10:17:11 UTC 2018 - tchvatal@suse.com + +- Cleanup with spec-cleaner +- Simplify the tests execution +- Install license files + ------------------------------------------------------------------- Thu Sep 21 09:04:38 UTC 2017 - tbechtold@suse.com diff --git a/python-testresources.spec b/python-testresources.spec index cee2921..83417c8 100644 --- a/python-testresources.spec +++ b/python-testresources.spec @@ -1,7 +1,7 @@ # # spec file for package python-testresources # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,13 +21,12 @@ Name: python-testresources Version: 2.0.1 Release: 0 Summary: Testresources, a pyunit extension for managing expensive test resources -License: (Apache-2.0 or BSD-3-Clause) and GPL-2.0+ +License: (Apache-2.0 OR BSD-3-Clause) AND GPL-2.0-or-later Group: Development/Languages/Python -Url: https://launchpad.net/testresources +URL: https://github.com/testing-cabal/testresources Source: https://files.pythonhosted.org/packages/source/t/testresources/testresources-%{version}.tar.gz # PATCH-FEATURE-UPSTREAM PR-8.patch -- https://github.com/testing-cabal/testresources/pull/8.patch Patch1: PR-8.patch -BuildRequires: %{python_module devel} BuildRequires: %{python_module fixtures} BuildRequires: %{python_module pbr} BuildRequires: %{python_module setuptools} @@ -36,7 +35,6 @@ BuildRequires: %{python_module testtools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pbr -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages @@ -56,10 +54,10 @@ of resources by test cases. %python_expand %fdupes -s %{buildroot}%{$python_sitelib} %check -%python_expand LANG=en_US.UTF-8 PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m testtools.run discover +%python_exec setup.py test %files %{python_files} -%defattr(-,root,root,-) +%license BSD Apache-2.0 COPYING %doc README.rst %{python_sitelib}/testresources %{python_sitelib}/testresources-%{version}-py%{python_version}.egg-info From 831c4af7ea314943d61973899458264278256a17171b2311bd0e9db13dcc63af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Aug 2018 10:33:41 +0000 Subject: [PATCH 2/2] - Add patch testresources-flaky-tests.patch to disable flaky test - Drop PR-8.patch as it is obsolete by the above patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testresources?expand=0&rev=15 --- PR-8.patch | 44 --------------------------------- python-testresources.changes | 6 +++++ python-testresources.spec | 6 ++--- testresources-flaky-tests.patch | 12 +++++++++ 4 files changed, 20 insertions(+), 48 deletions(-) delete mode 100644 PR-8.patch create mode 100644 testresources-flaky-tests.patch diff --git a/PR-8.patch b/PR-8.patch deleted file mode 100644 index f978229..0000000 --- a/PR-8.patch +++ /dev/null @@ -1,44 +0,0 @@ -From c308ca14278da92c657c1a3a079fafb93443e0f0 Mon Sep 17 00:00:00 2001 -From: Free Ekanayaka -Date: Sat, 26 Nov 2016 15:37:57 +0000 -Subject: [PATCH] Skip flaky testBasicSortTests on Python 3 - ---- - setup.cfg | 1 + - testresources/tests/test_optimising_test_suite.py | 2 ++ - 2 files changed, 3 insertions(+) - -Index: testresources-2.0.1/setup.cfg -=================================================================== ---- testresources-2.0.1.orig/setup.cfg -+++ testresources-2.0.1/setup.cfg -@@ -19,7 +19,8 @@ classifier = - Topic :: Software Development :: Testing - - [extras] --test = -+test = -+ six - docutils - fixtures - testtools -Index: testresources-2.0.1/testresources/tests/test_optimising_test_suite.py -=================================================================== ---- testresources-2.0.1.orig/testresources/tests/test_optimising_test_suite.py -+++ testresources-2.0.1/testresources/tests/test_optimising_test_suite.py -@@ -15,6 +15,7 @@ - # license. - # - -+import six - import testtools - import random - import testresources -@@ -498,6 +499,7 @@ class TestGraphStuff(testtools.TestCase) - permutations.append([case4, case1, case3, case2]) - return permutations - -+ @unittest2.skipIf(six.PY3, "Flaky on Python 3, see LP #1645008") - def testBasicSortTests(self): - # Test every permutation of inputs, with legacy tests. - # Cannot use equal costs because of the use of diff --git a/python-testresources.changes b/python-testresources.changes index 402fa2c..e4f3bc4 100644 --- a/python-testresources.changes +++ b/python-testresources.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 7 10:33:15 UTC 2018 - tchvatal@suse.com + +- Add patch testresources-flaky-tests.patch to disable flaky test +- Drop PR-8.patch as it is obsolete by the above patch + ------------------------------------------------------------------- Tue Aug 7 10:17:11 UTC 2018 - tchvatal@suse.com diff --git a/python-testresources.spec b/python-testresources.spec index 83417c8..eecc4a9 100644 --- a/python-testresources.spec +++ b/python-testresources.spec @@ -25,12 +25,10 @@ License: (Apache-2.0 OR BSD-3-Clause) AND GPL-2.0-or-later Group: Development/Languages/Python URL: https://github.com/testing-cabal/testresources Source: https://files.pythonhosted.org/packages/source/t/testresources/testresources-%{version}.tar.gz -# PATCH-FEATURE-UPSTREAM PR-8.patch -- https://github.com/testing-cabal/testresources/pull/8.patch -Patch1: PR-8.patch +Patch0: testresources-flaky-tests.patch BuildRequires: %{python_module fixtures} BuildRequires: %{python_module pbr} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} BuildRequires: %{python_module testtools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -44,7 +42,7 @@ of resources by test cases. %prep %setup -q -n testresources-%{version} -%patch1 -p1 +%patch0 -p1 %build %python_build diff --git a/testresources-flaky-tests.patch b/testresources-flaky-tests.patch new file mode 100644 index 0000000..eccaf7f --- /dev/null +++ b/testresources-flaky-tests.patch @@ -0,0 +1,12 @@ +Index: testresources-2.0.1/testresources/tests/test_optimising_test_suite.py +=================================================================== +--- testresources-2.0.1.orig/testresources/tests/test_optimising_test_suite.py ++++ testresources-2.0.1/testresources/tests/test_optimising_test_suite.py +@@ -498,6 +498,7 @@ class TestGraphStuff(testtools.TestCase) + permutations.append([case4, case1, case3, case2]) + return permutations + ++ @unittest.skip("too flaky") + def testBasicSortTests(self): + # Test every permutation of inputs, with legacy tests. + # Cannot use equal costs because of the use of