Sync from SUSE:ALP:Source:Standard:1.0 subunit revision 91fd01d896149973506fe9ba28e84f9e

This commit is contained in:
Adrian Schröter 2023-08-14 15:21:57 +02:00
commit f6f0cbf4fe
6 changed files with 555 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
1.4.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="versionprefix">1.4.0+git</param>
<param name="url">https://github.com/testing-cabal/subunit.git</param>
<param name="scm">git</param>
<param name="exclude">.git*</param>
<param name="changesgenerate">enable</param>
<param name="changesauthor">mcepl@cepl.eu</param>
</service>
<service name="recompress" mode="disabled">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/testing-cabal/subunit.git</param>
<param name="changesrevision">a629de4fbf04b62361e67a1e04e29474ca18d2b0</param></service></servicedata>

200
subunit.changes Normal file
View File

@ -0,0 +1,200 @@
-------------------------------------------------------------------
Thu Jul 13 08:59:30 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- remove hardcoded python executable names from Makefile and test
scripts
- Use python_subpackage_only 1 everywhere, not only on Tumbleweed
and Leap 15.5
-------------------------------------------------------------------
Mon Jul 3 11:43:29 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
- Use python_subpackage_only 1 from Tumbleweed for Leap 15.5 also.
-------------------------------------------------------------------
Fri Mar 24 06:07:32 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- set PYTHON environment variable in %build step, to allow
builds even if /usr/bin/python3 does not exist
-------------------------------------------------------------------
Mon Feb 20 08:56:33 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Upgrade to 1.4.2:
- IMPROVEMENTS
* Drop various compatibility wrappers for Python < 3.6.
* Add support for Python 3.9
* Add support for Python 3.10
* Drop support for Python 2.7, 3.4, and 3.5
* Convert python scripts to entry_points.
* Migrate CI from travis to GitHub actions.
* Add options to output filter to set timestamps.
* Remove dependency on unittest2.
- BUGFIXES
* Fix "subunit-filter --fixup-expected-failures"
on Python 3.
* Fix tests with testtools >= 2.5.0.
* Mark rawstrings as such, fixing warnings.
- Remove upstreamed patch python38-failing-tests.patch
-------------------------------------------------------------------
Mon May 09 06:19:54 UTC 2022 - mcepl@cepl.eu
- Update to version 1.4.0+git.1643134405.a629de4:
* Explicitly invoke python3.
* Check minimum version of Python in configure.ac.
* Add testing for Python 3.10
* Stop using io imports from testtools
* Remove logic for Python < 3.6
* Drop support for Python 2.7, 3.5
-------------------------------------------------------------------
Sat Oct 16 21:33:15 UTC 2021 - mcepl@cepl.eu
- Update to version 1.4.0+git.1627548288.c87ffbd:
* Update NEWS
* Handle different SyntaxError output in testtools 2.5.0
* Sort Content-Type parameters when writing details
* Import six from the right place
* Pivot CI to github actions
* Revert "Merge pull request #17 from mtreinish/timestamp-output"
* fix trailing comma
* Fix imports from testtools.compat
* python: Mark rawstrings as such
* run everything on focal, except pypy3.5 which only runs on xenial
* add missing reference
* add current pythons
* drop Python 3.4 support
* Unittest from testtools doesn't work, use the one from stdlib.
* Acommodate review requests.
* Fix timestamp test copy paste error
* Add options to output filter to set timestamps
* Remove dependency on unittest2
- remove remove_unittest2.patch (upstream)
-------------------------------------------------------------------
Mon May 24 06:06:52 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Run the subunit filters under python3.
- Remove duplicate BuildRequires.
-------------------------------------------------------------------
Thu Mar 25 16:27:58 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Can't assume non-existence of python38 macros in Leap.
gh#openSUSE/python-rpm-macros#107
Test for suse_version instead. Only Tumbleweed has and needs the
python_subpackage_only support.
-------------------------------------------------------------------
Thu Dec 3 01:52:05 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Support multiple python flavors in python subpackage
gh#openSUSE/python-rpm-macros#66
-------------------------------------------------------------------
Fri Jun 5 08:36:13 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add remove_unittest2.patch to remove dependency on unittest2
-------------------------------------------------------------------
Tue Mar 31 09:44:25 UTC 2020 - mcepl@cepl.eu
- Update to version 1.4.0+git.1584197985.0e9f67b:
* Release 1.4.0.
* Correctly handle py3 RawIOBase read()
-------------------------------------------------------------------
Wed Mar 11 20:24:28 UTC 2020 - mcepl@cepl.eu
- Update to version 1.3.0+git.1583777524.8fb3e0c:
* trivial: Fix indentation
* Add license to setup.py
* Update setup.py
* Add support for new python versions and update pkg metadata
* Remove broken Python 2.6 travis CI job
* Check written bytes are not None before summing them to offset
* Fix file open for python3
* Stop running 3.3 on travis.
- Switch off building python2 bindings.
- Add python38-failing-tests.patch to skip failing tests.
-------------------------------------------------------------------
Wed Mar 11 18:51:21 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Add python38-failing-tests.patch skipping failing tests
-------------------------------------------------------------------
Tue Apr 16 20:31:02 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- fix dependency for subunit-filters
-------------------------------------------------------------------
Wed Apr 10 09:05:37 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- fix package naming of the python subpackages to follow
packaging policy
-------------------------------------------------------------------
Mon Apr 8 10:23:27 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- add explicit unittest2 buildrequires
-------------------------------------------------------------------
Sat Apr 6 18:50:11 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- add obsoletes
-------------------------------------------------------------------
Sat Apr 6 18:03:47 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- drop subunit-unbundle-iso8601.patch: there is no room for fedora
specific patches in opensuse and the iso8601 pypi module is completely
incompatible with that this version, so nothing works
- remove-unittest2.patch, subunit-decode-binary-to-unicode.patch
needed to get it back to a working state
-------------------------------------------------------------------
Sat Apr 6 16:11:02 UTC 2019 - Dirk Mueller <dmueller@suse.com>
- fix build for older distros by adding the singlespec macros
-------------------------------------------------------------------
Mon Mar 18 16:08:06 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Fix Requires
-------------------------------------------------------------------
Tue Mar 12 10:20:42 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Just Obsolete, don't Conflict as well
-------------------------------------------------------------------
Mon Feb 25 12:39:36 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Add Conflicts to python-* subpackages
-------------------------------------------------------------------
Wed Feb 6 18:12:06 CET 2019 - Matej Cepl <mcepl@suse.com>
- Clean up the SPEC file and use more macros
- Add remove-unittest2.patch to remove necessity to use python-unittest2 BR.
- Change all URLs to the new location.
-------------------------------------------------------------------
Sun Nov 11 17:46:34 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Fix RPM groups. Trim bias from descriptions.
-------------------------------------------------------------------
Mon Oct 29 22:58:46 CET 2018 - mcepl@suse.com
- Add subunit Python subpackages
FIXME: this is without remove-unittest2.patch
-------------------------------------------------------------------
Fri Sep 14 13:03:34 UTC 2018 - Matěj Cepl <mcepl@suse.com>
- Initial effort to repackage originally Fedora package for
version 1.3.0.

310
subunit.spec Normal file
View File

@ -0,0 +1,310 @@
#
# spec file for package subunit
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
%define python_subpackage_only 1
%bcond_with python2
%{?sle15_python_module_pythons}
Name: subunit
Version: 1.4.2
%global majver %(awk 'BEGIN { OFS="."; FS="[\\.\\+]+" } {print $1, $2, $3}' <<< %{version})
# %%global majver 1.4
Release: 0
Summary: C library for the subunit testing protocol
License: Apache-2.0 OR BSD-3-Clause
Group: Development/Tools/Other
URL: https://github.com/testing-cabal/subunit
# Source0: %%{name}-%%{version}.tar.xz
Source0: https://github.com/testing-cabal/%{name}/archive/refs/tags/%{version}.tar.gz
BuildRequires: %{python_module docutils}
BuildRequires: %{python_module extras}
BuildRequires: %{python_module fixtures}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module iso8601}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module testscenarios}
BuildRequires: %{python_module testtools >= 1.8.0}
BuildRequires: %{python_module wheel}
BuildRequires: check-devel
BuildRequires: cppunit-devel
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: perl(ExtUtils::MakeMaker)
%python_subpackages
%description
Subunit C bindings. See the python-subunit package for test processing
functionality.
%package -n libsubunit0
Summary: Binary libraries for %{name}
Group: System/Libraries
Requires: %{name}%{?_isa} >= %{version}-%{release}
%description -n libsubunit0
Binary libraries for %{name}
%package devel
Summary: Header files for developing C applications that use subunit
Group: Development/Libraries/C and C++
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libsubunit0 = %{version}-%{release}
%description devel
Header files and libraries for developing C applications that use subunit.
%package -n libcppunit_subunit0
Summary: Subunit integration into cppunit
Group: System/Libraries
Requires: %{name}%{?_isa} >= %{version}-%{release}
%description -n libcppunit_subunit0
Subunit integration into cppunit.
%package -n libcppunit_subunit0-devel
Summary: Header files for applications that use cppunit and subunit
Group: Development/Libraries/C and C++
Requires: cppunit-devel%{?_isa}
Requires: libcppunit_subunit0%{?_isa} = %{version}-%{release}
Requires: subunit-devel%{?_isa} = %{version}-%{release}
%description -n libcppunit_subunit0-devel
Header files and libraries for developing applications that use cppunit
and subunit.
%package -n perl-subunit
Summary: Perl bindings for subunit
Group: Development/Libraries/Perl
Requires: perl-base = %{perl_version}
BuildArch: noarch
%description -n perl-subunit
Subunit Perl bindings. See the python3-python-subunit package for test
processing functionality.
%package shell
Summary: Shell bindings for subunit
Group: Development/Libraries/Other
BuildArch: noarch
%description shell
Subunit shell bindings. See the python3-python-subunit package for test
processing functionality.
%if 0%{?python_subpackage_only}
%package -n python-python-%{name}
Summary: Streaming protocol for test results
Group: Development/Libraries/Python
Requires: python-extras
Requires: python-testtools >= 1.8.0
BuildArch: noarch
%description -n python-python-%{name}
Subunit is a streaming protocol for test results. The protocol is a
binary encoding that is generated and parsed. By design, all the
components of the protocol conceptually fit into the xUnit TestCase ->
TestResult interaction.
Subunit comes with command line filters to process a subunit stream and
language bindings for Python, C, C++ and Shell. Bindings can be
written for other languages.
A number of useful things can be done easily with subunit:
- Test aggregation: Tests run separately can be combined and then
reported/displayed together. For instance, tests from different
languages can be shown as a seamless whole.
- Test archiving: A test run may be recorded and replayed later.
- Test isolation: Tests that may crash or otherwise interact badly with
each other can be run separately and then aggregated, rather than
interfering with each other.
- Grid testing: subunit can act as the necessary serialization and
deserialization to get test runs on distributed machines to be
reported in real time.
%else
%package -n python3-python-%{name}
Summary: Streaming protocol for test results
Group: Development/Libraries/Python
Requires: python3-extras
Requires: python3-testtools >= 1.8.0
BuildArch: noarch
%description -n python3-python-%{name}
Subunit is a streaming protocol for test results. The protocol is a
binary encoding that is generated and parsed. By design, all the
components of the protocol conceptually fit into the xUnit TestCase ->
TestResult interaction.
Subunit comes with command line filters to process a subunit stream and
language bindings for Python, C, C++ and Shell. Bindings can be
written for other languages.
A number of useful things can be done easily with subunit:
- Test aggregation: Tests run separately can be combined and then
reported/displayed together. For instance, tests from different
languages can be shown as a seamless whole.
- Test archiving: A test run may be recorded and replayed later.
- Test isolation: Tests that may crash or otherwise interact badly with
each other can be run separately and then aggregated, rather than
interfering with each other.
- Grid testing: subunit can act as the necessary serialization and
deserialization to get test runs on distributed machines to be
reported in real time.
%endif
%package filters
Summary: Command line filters for processing subunit streams
Group: Development/Tools/Other
Requires: python3-junitxml
Requires: python3-python-%{name} = %{version}-%{release}
Requires: typelib-1_0-Gtk-3_0
BuildArch: noarch
%description filters
Command line filters for processing subunit streams.
%prep
%autosetup -p1
fixtimestamp() {
touch -r $1.orig $1
rm $1.orig
}
# Help the dependency generator
for filt in python/subunit/filter_scripts/*; do
sed -i.orig '1{\@^#! */usr/bin/env python@d}' $filt
touch -r $filt.orig ${filt}
rm ${filt}.orig
done
%build
# Generate the configure script
autoreconf -fvi
export INSTALLDIRS=perl
# any python will do, this is only for the non-python part of the package
PYTHON=$(find %_bindir -name 'python3*[0-9]' -print -quit)
export PYTHON
%configure \
--enable-shared \
--disable-static
%make_build
%pyproject_wheel
%install
%pyproject_install
%{python_expand chmod 0755 %{buildroot}%{$python_sitelib}/%{name}/run.py
# Eliminate duplicates
rm -fr %{buildroot}%{$python_sitelib}/subunit/tests
%fdupes %{buildroot}%{$python_sitelib}
}
# NON-PYTHON STUFF
# We set pkgpython_PYTHON for efficiency to disable automake python compilation
%make_install pkgpython_PYTHON='' INSTALL="%{_bindir}/install -p"
# Install the shell interface
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
cp -p shell/share/%{name}.sh %{buildroot}%{_sysconfdir}/profile.d
# Remove unwanted libtool files
find %{buildroot} -type f -name "*.la" -delete -print
# Fix perl installation
mkdir -p %{buildroot}%{perl_vendorlib}
mv %{buildroot}%{perl_sitelib}/Subunit* %{buildroot}%{perl_vendorlib}
rm -fr %{buildroot}%{perl_archlib} %{buildroot}%{perl_sitearch}
# Fix permissions
chmod 0755 %{buildroot}%{_bindir}/subunit-diff
# Fix timestamps
touch -r c/include/%{name}/child.h %{buildroot}%{_includedir}/%{name}/child.h
touch -r c++/SubunitTestProgressListener.h \
%{buildroot}%{_includedir}/%{name}/SubunitTestProgressListener.h
touch -r perl/subunit-diff %{buildroot}%{_bindir}/subunit-diff
%check
%if 0%{?suse_version} > 1500
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} PYTHON=%{$python}
# https://bugs.launchpad.net/subunit/+bug/1323410
find . -name sample\*.py -exec chmod +x '{}' \;
# replace hardcoded python3 with the python executable that is actually used
find . -name sample\*.py -exec sed -i "1{s/python3.*$/python%{$python_version}/;}" {} +
sed -i '/testtools.run/ s#$(PYTHON)#/usr/bin/python%{$python_version}#' Makefile
%make_build check
}
%endif
%post -n libsubunit0 -p /sbin/ldconfig
%postun -n libsubunit0 -p /sbin/ldconfig
%post -n libcppunit_subunit0 -p /sbin/ldconfig
%postun -n libcppunit_subunit0 -p /sbin/ldconfig
%files
%doc NEWS README.rst
%license Apache-2.0 BSD COPYING
%files -n libsubunit0
%doc NEWS README.rst
%license Apache-2.0 BSD COPYING
%{_libdir}/lib%{name}.so.*
%files devel
%doc c/README
%dir %{_includedir}/%{name}/
%{_includedir}/%{name}/child.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/lib%{name}.pc
%files -n libcppunit_subunit0
%{_libdir}/libcppunit_%{name}.so.*
%files -n libcppunit_subunit0-devel
%doc c++/README
%{_includedir}/%{name}/SubunitTestProgressListener.h
%{_libdir}/libcppunit_%{name}.so
%{_libdir}/pkgconfig/libcppunit_%{name}.pc
%files -n perl-subunit
%license Apache-2.0 BSD COPYING
%{_bindir}/%{name}-diff
%{perl_vendorlib}/*
%files shell
%doc shell/README
%license Apache-2.0 BSD COPYING
%config(noreplace) %{_sysconfdir}/profile.d/%{name}.sh
%files %{python_files python-%{name}}
%license Apache-2.0 BSD COPYING
%{python_sitelib}/%{name}/
%{python_sitelib}/python_%{name}-%{majver}*-info
%files filters
%{_bindir}/*
%exclude %{_bindir}/%{name}-diff
%changelog