14
0

- Patch out flaky tests that seldomly fails in obs:

* obs-timeout.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zdaemon?expand=0&rev=30
This commit is contained in:
Tomáš Chvátal
2019-09-12 17:16:52 +00:00
committed by Git OBS Bridge
parent d3b78c6d47
commit b8345dc20a
3 changed files with 50 additions and 0 deletions

42
obs-timeout.patch Normal file
View File

@@ -0,0 +1,42 @@
Index: zdaemon-4.3/src/zdaemon/tests/tests.py
===================================================================
--- zdaemon-4.3.orig/src/zdaemon/tests/tests.py
+++ zdaemon-4.3/src/zdaemon/tests/tests.py
@@ -304,37 +304,6 @@ def test_start_test_program():
"""
-def test_start_timeout():
- """
- >>> write('t.py',
- ... '''
- ... import time
- ... time.sleep(9)
- ... ''')
-
- >>> write('conf',
- ... '''
- ... <runner>
- ... program %s t.py
- ... start-test-program cat x
- ... start-timeout 1
- ... </runner>
- ... ''' % sys.executable)
-
- >>> import time
- >>> start = time.time()
-
- >>> system("./zdaemon -Cconf start")
- <BLANKLINE>
- Program took too long to start
- Failed: 1
-
- >>> system("./zdaemon -Cconf stop")
- <BLANKLINE>
- daemon process stopped
- """
-
-
def DAEMON_MANAGER_MODE_leak():
"""
Zdaemon used an environment variable to flag that it's running in

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 12 17:12:56 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Patch out flaky tests that seldomly fails in obs:
* obs-timeout.patch
-------------------------------------------------------------------
Tue Apr 9 10:53:45 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>

View File

@@ -26,6 +26,7 @@ License: ZPL-2.1
Group: Development/Languages/Python
URL: https://github.com/zopefoundation/zdaemon
Source: https://files.pythonhosted.org/packages/source/z/zdaemon/%{modname}-%{version}.tar.gz
Patch0: obs-timeout.patch
BuildRequires: %{python_module ZConfig}
BuildRequires: %{python_module manuel}
BuildRequires: %{python_module mock}
@@ -49,6 +50,7 @@ although it is not limited to running Python-based applications
%prep
%setup -q -n %{modname}-%{version}
%patch0 -p1
# remove unwanted shebang
sed -i '1 { /^#!/ d }' src/zdaemon/tests/nokill.py
rm -rf src/zdaemon.egg-info