From c90eecb7ac368be50a8abd27eeb060796e97469c80b23c322375ecae7f09c1b8 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Tue, 31 Mar 2020 09:23:41 +0000 Subject: [PATCH] Accepting request 790048 from home:scarabeus_iv:branches:devel:tools:scm [ 187s] = 2174 failed, 8084 passed, 379 skipped, 24 xfailed, 830 warnings in 162.20s (0:02:42) = ^^ it still needs fixes, but at least enables the testing so we have somewhere to start - Add patch to fix borked test import fix-tests.ptch - Enable testing OBS-URL: https://build.opensuse.org/request/show/790048 OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/breezy?expand=0&rev=2 --- breezy.changes | 6 ++++++ breezy.spec | 58 +++++++++++++++++++++++--------------------------- fix-tests.ptch | 13 +++++++++++ 3 files changed, 46 insertions(+), 31 deletions(-) create mode 100644 fix-tests.ptch diff --git a/breezy.changes b/breezy.changes index 045bbe2..02d369b 100644 --- a/breezy.changes +++ b/breezy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 31 09:08:38 UTC 2020 - Tomáš Chvátal + +- Add patch to fix borked test import fix-tests.ptch +- Enable testing + ------------------------------------------------------------------- Wed Mar 4 10:49:47 UTC 2020 - Antonio Larrosa diff --git a/breezy.spec b/breezy.spec index 85bf7cd..816a60d 100644 --- a/breezy.spec +++ b/breezy.spec @@ -1,7 +1,7 @@ # -# spec file for package python-breezy +# spec file for package breezy # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,61 +12,57 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# -%define skip_python2 1 Name: breezy Version: 3.0.2 Release: 0 -License: GPL-2.0 Summary: Friendly distributed version control system -Url: https://www.breezy-vcs.org/ -Group: Development/Languages/Python +License: GPL-2.0-only +URL: https://www.breezy-vcs.org/ Source: https://files.pythonhosted.org/packages/source/b/breezy/breezy-%{version}.tar.gz +Patch0: fix-tests.ptch +BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-devel BuildRequires: python3-setuptools -# SECTION test requirements -BuildRequires: python3-configobj -BuildRequires: python3-fixtures >= 1.3.0 -BuildRequires: python3-dulwich >= 0.19.11 -BuildRequires: python3-fastimport >= 0.9.8 -BuildRequires: python3-six >= 1.9.0 -BuildRequires: python3-testtools -BuildRequires: python3-pytest -BuildRequires: python3-tox -BuildRequires: python3-dulwich -# /SECTION -BuildRequires: fdupes Requires: python3-configobj Requires: python3-dulwich >= 0.19.11 Requires: python3-fastimport >= 0.9.8 Requires: python3-six >= 1.9.0 Suggests: python3-launchpadlib >= 1.6.3 +# SECTION test requirements +BuildRequires: python3-configobj +BuildRequires: python3-dulwich >= 0.19.11 +BuildRequires: python3-fastimport >= 0.9.8 +BuildRequires: python3-fixtures >= 1.3.0 +BuildRequires: python3-pytest +BuildRequires: python3-pytest-xdist +BuildRequires: python3-six >= 1.9.0 +BuildRequires: python3-testtools +# /SECTION %description Friendly distributed version control system %prep %setup -q -n breezy-%{version} +%patch0 -p1 sed -ie "s,man/man1,share/man/man1," setup.py %build export CFLAGS="%{optflags}" -%python_build +%python3_build %install -%python_install -%python_expand %fdupes %{buildroot}%{$python_sitearch} +%python3_install +%fdupes %{buildroot}%{python3_sitearch} -%if 0 %check -virtualenv --system-site-packages --no-download testvenv -testvenv/bin/pip install -e . -export PYTHONPATH=$PWD/testvenv/lib/python%{python_bin_suffix}/site-packages/:$PWD -testvenv/bin/python -m pytest && rm -Rf testvenv -%endif +export PYTHONPATH=%{buildroot}%{python3_sitearch} +python3 -m pytest -v -n auto %files %doc NEWS README.rst README_BDIST_RPM @@ -76,8 +72,8 @@ testvenv/bin/python -m pytest && rm -Rf testvenv %{_bindir}/git-remote-bzr %{_bindir}/brz %{python_sitearch}/breezy -%{python_sitearch}/breezy-%{version}-py%{python_version}.egg-info -%{_mandir}/man1/brz.1* -%{_mandir}/man1/git-remote-bzr.1* +%{python_sitearch}/breezy-%{version}-py%{python3_version}.egg-info +%{_mandir}/man1/brz.1%{?ext_man} +%{_mandir}/man1/git-remote-bzr.1%{?ext_man} %changelog diff --git a/fix-tests.ptch b/fix-tests.ptch new file mode 100644 index 0000000..e15714c --- /dev/null +++ b/fix-tests.ptch @@ -0,0 +1,13 @@ +Index: breezy-3.0.2/breezy/plugins/fastimport/tests/test_head_tracking.py +=================================================================== +--- breezy-3.0.2.orig/breezy/plugins/fastimport/tests/test_head_tracking.py ++++ breezy-3.0.2/breezy/plugins/fastimport/tests/test_head_tracking.py +@@ -26,7 +26,7 @@ from fastimport import ( + + import testtools + +-from .reftracker import ( ++from fastimport.reftracker import ( + RefTracker, + ) +