diff options
author | Trevor Gamblin <trevor.gamblin@windriver.com> | 2021-06-07 11:28:30 -0400 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-09 08:45:24 -0700 |
commit | f3426371315ef7e19bed4347b2f071e02888dd98 (patch) | |
tree | f01468157630a542d7e8fc3a4c761b3f6d94cb7e /meta-python | |
parent | cf6014d1b5f75a74bde221a5c9a39152c40433c2 (diff) | |
download | meta-openembedded-f3426371315ef7e19bed4347b2f071e02888dd98.tar.gz |
python3-yappi: fix ptests
- Add a patch to fix imports in unit tests
- Add python3-gevent and python3-zopeinterface to ptest RDEPENDS
- Sort ptest RDEPENDS alphabetically
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch | 96 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb | 5 |
2 files changed, 100 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch b/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch new file mode 100644 index 0000000000..714b2a2d34 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch @@ -0,0 +1,96 @@ +From 0dedc1c573ddc4e87475eb03c64555cd54a72e92 Mon Sep 17 00:00:00 2001 +From: Trevor Gamblin <trevor.gamblin@windriver.com> +Date: Mon, 7 Jun 2021 09:40:20 -0400 +Subject: [PATCH] Fix imports for tests + +Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> +--- + tests/test_asyncio.py | 2 +- + tests/test_asyncio_context_vars.py | 2 +- + tests/test_functionality.py | 2 +- + tests/test_gevent.py | 2 +- + tests/test_hooks.py | 2 +- + tests/test_tags.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py +index 4ac4c5f..4de94cf 100644 +--- a/tests/test_asyncio.py ++++ b/tests/test_asyncio.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import asyncio + import threading +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + @asyncio.coroutine +diff --git a/tests/test_asyncio_context_vars.py b/tests/test_asyncio_context_vars.py +index 5bd750c..9a253c0 100644 +--- a/tests/test_asyncio_context_vars.py ++++ b/tests/test_asyncio_context_vars.py +@@ -5,7 +5,7 @@ import contextvars + import functools + import time + import os +-import utils ++import tests.utils as utils + import yappi + + async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index a73cb63..2ab273f 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -5,7 +5,7 @@ import threading + import unittest + import yappi + import _yappi +-import utils ++import tests.utils as utils + import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 + import subprocess + +diff --git a/tests/test_gevent.py b/tests/test_gevent.py +index 8569712..fe15b29 100644 +--- a/tests/test_gevent.py ++++ b/tests/test_gevent.py +@@ -4,7 +4,7 @@ import yappi + import gevent + from gevent.event import Event + import threading +-from utils import ( ++from .utils import ( + YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io, + burn_io_gevent + ) +diff --git a/tests/test_hooks.py b/tests/test_hooks.py +index a96a4f1..e4177ba 100644 +--- a/tests/test_hooks.py ++++ b/tests/test_hooks.py +@@ -5,7 +5,7 @@ import unittest + import time + + import yappi +-import utils ++import tests.utils as utils + + + def a(): +diff --git a/tests/test_tags.py b/tests/test_tags.py +index b0b531d..1928888 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import threading + import time +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + class MultiThreadTests(YappiUnitTestCase): +-- +2.31.1 + diff --git a/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb b/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb index 7c3f0fd4be..8a1aca21fe 100644 --- a/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb +++ b/meta-python/recipes-devtools/python/python3-yappi_1.3.2.bb @@ -8,6 +8,7 @@ SRC_URI[sha256sum] = "a51d3e6e5563cc74b5bb82ed6e7bd44a9c1a7eae3d97e4d52e9465edb3 SRC_URI += " \ file://run-ptest \ + file://0001-Fix-imports-for-ptests.patch \ " inherit pypi setuptools3 ptest @@ -19,9 +20,11 @@ RDEPENDS_${PN} += "\ " RDEPENDS_${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-gevent \ ${PYTHON_PN}-multiprocessing \ + ${PYTHON_PN}-pytest \ ${PYTHON_PN}-profile \ + ${PYTHON_PN}-zopeinterface \ " do_install_ptest() { |