osc copypac from project:Cloud:OpenStack:Rocky package:python-pexpect revision:2, using keep-link, using expand
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pexpect?expand=0&rev=39
This commit is contained in:
parent
9caa005b92
commit
8e08a177c4
27
fix-test.patch
Normal file
27
fix-test.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
https://github.com/pexpect/pexpect/pull/527
|
||||||
|
commit 5349569bcad4ab1685c9f2ec2a2c77a69cde4e48
|
||||||
|
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
||||||
|
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'])
|
@ -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
|
Sun Jun 24 15:49:37 UTC 2018 - arun@gmx.de
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ License: ISC
|
|||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
URL: http://pexpect.readthedocs.org/en/latest/
|
URL: http://pexpect.readthedocs.org/en/latest/
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
|
||||||
|
Patch0: fix-test.patch
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module ptyprocess}
|
BuildRequires: %{python_module ptyprocess}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
@ -44,6 +45,7 @@ controlling them; and responding to expected patterns in their output.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pexpect-%{version}
|
%setup -q -n pexpect-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
# Fix wrong-script-interpreter
|
# Fix wrong-script-interpreter
|
||||||
find examples -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} \;
|
find examples -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} \;
|
||||||
|
Loading…
Reference in New Issue
Block a user