From 97d8b53355d647b26f04b59ee0d5e3d621f9e951 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Jun 12 2015 16:57:00 +0000 Subject: New upstream release. Enable python3 tests. --- diff --git a/.gitignore b/.gitignore index e16102e..1d20efe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /subunit-1.0.0.tar.gz +/subunit-1.1.0.tar.gz diff --git a/sources b/sources index 1ae3087..7b2f753 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d749f46b2218f2a105dd4e3a57d55176 subunit-1.0.0.tar.gz +d1c5b2649047c1027d7054cb70039cca subunit-1.1.0.tar.gz diff --git a/subunit-test.patch b/subunit-test.patch new file mode 100644 index 0000000..d74b066 --- /dev/null +++ b/subunit-test.patch @@ -0,0 +1,17 @@ +--- ./python/subunit/tests/__init__.py.orig 2015-03-09 17:18:58.000000000 -0600 ++++ ./python/subunit/tests/__init__.py 2015-06-11 20:00:00.000000000 -0600 +@@ -24,10 +24,12 @@ from testscenarios import generate_scena + # For testing: different pythons have different str() implementations. + if (3,1) < sys.version_info < (3, 4): + _remote_exception_repr = "testtools.testresult.real._StringException" ++ _remote_exception_id = "57" + else: + _remote_exception_repr = "_StringException" +-_remote_exception_str = "Traceback (most recent call last):\ntesttools.testresult.real._StringException" +-_remote_exception_str_chunked = "57\r\n" + _remote_exception_str + ": boo qux\n0\r\n" ++ _remote_exception_id = "3D" ++_remote_exception_str = "Traceback (most recent call last):\n" + _remote_exception_repr ++_remote_exception_str_chunked = _remote_exception_id + "\r\n" + _remote_exception_str + ": boo qux\n0\r\n" + + + from subunit.tests import ( diff --git a/subunit.spec b/subunit.spec index a0b8177..2aba09c 100644 --- a/subunit.spec +++ b/subunit.spec @@ -3,8 +3,8 @@ %endif Name: subunit -Version: 1.0.0 -Release: 3%{?dist} +Version: 1.1.0 +Release: 1%{?dist} Summary: C bindings for subunit License: ASL 2.0 or BSD @@ -12,6 +12,8 @@ URL: https://launchpad.net/%{name} Source0: https://launchpad.net/%{name}/trunk/%{version}/+download/%{name}-%{version}.tar.gz # Fedora-specific patch: remove the bundled copy of python-iso8601. Patch0: %{name}-unbundle-iso8601.patch +# Patch to fix the python2 tests in 1.1.0 +Patch1: %{name}-test.patch BuildRequires: check-devel BuildRequires: cppunit-devel @@ -29,6 +31,7 @@ BuildRequires: python3-devel BuildRequires: python3-extras BuildRequires: python3-iso8601 BuildRequires: python3-setuptools +BuildRequires: python3-testscenarios BuildRequires: python3-testtools >= 0.9.37 %endif @@ -149,6 +152,7 @@ Command line filters for processing subunit streams. %prep %setup -q %patch0 +%patch1 # Remove bundled code rm -fr python/iso8601 python/subunit/iso8601.py @@ -241,13 +245,21 @@ rm -fr %{buildroot}%{python2_sitelib}/subunit/tests rm -fr %{buildroot}%{python3_sitelib}/subunit/tests %check -# We run tests for python 2 only, since there is no python 3 variant of -# testscenarios (see https://bugs.launchpad.net/testscenarios/+bug/941963). -# Once that has been resolved, we can run tests for python 3 also. +# Run the tests for python2 export LD_LIBRARY_PATH=$PWD/.libs export PYTHONPATH=$PWD/python/subunit:$PWD/python/subunit/tests make check +%if 0%{?with_py3} +# Run the tests for python3 +mv python python2 +mv python3 python +export PYTHON=%{__python3} +make check +mv python python3 +mv python2 python +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -304,6 +316,10 @@ make check %exclude %{_bindir}/%{name}-diff %changelog +* Fri Jun 12 2015 Jerry James - 1.1.0-1 +- New upstream release +- Enable python3 tests + * Wed Jun 03 2015 Jitka Plesnikova - 1.0.0-3 - Perl 5.22 rebuild