diff --git a/fix-test.patch b/fix-test.patch new file mode 100644 index 0000000..db26cc2 --- /dev/null +++ b/fix-test.patch @@ -0,0 +1,27 @@ +https://github.com/pexpect/pexpect/pull/527 +commit 5349569bcad4ab1685c9f2ec2a2c77a69cde4e48 +Author: Bernhard M. Wiedemann +Date: Tue Sep 4 13:57:43 2018 +0200 + + tests: ignore stderr from openssl + + Without this patch, the test failed with openssl-1.0.2p + because 502 lines were captured with the extra lines being at the end: + 140510355240592:error:02012020:system library:fflush:Broken pipe:bss_file.c:434:fflush() + 140510355240592:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:436: + + neither openssl-1.0.2j nor 1.1.0h needed this patch. + +diff --git a/tests/test_expect.py b/tests/test_expect.py +index 795518a..2c74744 100755 +--- a/tests/test_expect.py ++++ b/tests/test_expect.py +@@ -411,7 +411,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase): + def test_before_across_chunks(self): + # https://github.com/pexpect/pexpect/issues/478 + child = pexpect.spawn( +- '''/bin/bash -c "openssl rand -base64 {} | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2), ++ '''/bin/bash -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2), + searchwindowsize=128 + ) + child.expect(['PATTERN']) diff --git a/python-pexpect.changes b/python-pexpect.changes index 9ee41db..cd73415 100644 --- a/python-pexpect.changes +++ b/python-pexpect.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 4 13:35:41 UTC 2018 - bwiedemann@suse.com + +- Add fix-test.patch to make tests pass with SLE-12-SP4's openssl (bsc#1107105) + ------------------------------------------------------------------- Sun Jun 24 15:49:37 UTC 2018 - arun@gmx.de diff --git a/python-pexpect.spec b/python-pexpect.spec index 7477f63..b25007c 100644 --- a/python-pexpect.spec +++ b/python-pexpect.spec @@ -25,6 +25,7 @@ License: ISC Group: Development/Libraries/Python URL: http://pexpect.readthedocs.org/en/latest/ Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz +Patch0: fix-test.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module ptyprocess} BuildRequires: %{python_module pytest} @@ -44,6 +45,7 @@ controlling them; and responding to expected patterns in their output. %prep %setup -q -n pexpect-%{version} +%patch0 -p1 # Fix wrong-script-interpreter find examples -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} \;