From 4708606398c25773d00552942b9a82d099116a26 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Tue, 21 Jul 2026 17:11:05 +0300 Subject: [PATCH] python3-invoke: Enable tests Inherit ptest-python-pytest and include tests for invoke. Use -s because some tests read from stdin while output is captured. Skip tests that require a real terminal. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj --- .../python/python3-invoke/run-ptest | 19 ++++++++++++ .../python/python3-invoke_3.0.3.bb | 29 ++++++++++++++----- 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-invoke/run-ptest diff --git a/meta-python/recipes-devtools/python/python3-invoke/run-ptest b/meta-python/recipes-devtools/python/python3-invoke/run-ptest new file mode 100644 index 0000000000..7487702f2d --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-invoke/run-ptest @@ -0,0 +1,19 @@ +#!/bin/sh + +pytest -s --automake \ + --deselect "tests/runners.py::Local_::pty::when_pty_True_we_use_pty_fork_and_os_exec" \ + --deselect "tests/runners.py::Local_::pty::pty_uses_WEXITSTATUS_if_WIFEXITED" \ + --deselect "tests/runners.py::Local_::pty::pty_uses_WTERMSIG_if_WIFSIGNALED" \ + --deselect "tests/runners.py::Local_::pty::WTERMSIG_result_turned_negative_to_match_subprocess" \ + --deselect "tests/runners.py::Local_::pty::pty_is_set_to_controlling_terminal_size" \ + --deselect "tests/runners.py::Local_::pty::spurious_OSErrors_handled_gracefully" \ + --deselect "tests/runners.py::Local_::pty::other_spurious_OSErrors_handled_gracefully" \ + --deselect "tests/runners.py::Local_::pty::non_spurious_OSErrors_bubble_up" \ + --deselect "tests/runners.py::Local_::pty::stop_mutes_errors_on_pty_close" \ + --deselect "tests/runners.py::Local_::pty::fallback::can_be_overridden_by_kwarg" \ + --deselect "tests/runners.py::Local_::pty::fallback::can_be_overridden_by_config" \ + --deselect "tests/runners.py::Local_::pty::fallback::overridden_fallback_affects_result_pty_value" \ + --deselect "tests/runners.py::Local_::shell::defaults_to_bash_or_cmdexe_when_pty_True" \ + --deselect "tests/runners.py::Local_::shell::may_be_overridden_when_pty_True" \ + --deselect "tests/runners.py::Local_::env::uses_execve_for_pty_True" \ + --deselect "tests/runners.py::Local_::get_pid::is_top_level_pid_when_using_pty" diff --git a/meta-python/recipes-devtools/python/python3-invoke_3.0.3.bb b/meta-python/recipes-devtools/python/python3-invoke_3.0.3.bb index e9d19da088..a5e6198ce8 100644 --- a/meta-python/recipes-devtools/python/python3-invoke_3.0.3.bb +++ b/meta-python/recipes-devtools/python/python3-invoke_3.0.3.bb @@ -3,16 +3,29 @@ HOMEPAGE = "https://www.pyinvoke.org/" LICENSE = "BSD-2-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=a8815068973f31b78c328dc067e297ab" +SRC_URI += "file://run-ptest" + SRC_URI[sha256sum] = "437b6a622223824380bfb4e64f612711a6b648c795f565efc8625af66fb57f0c" -inherit pypi python_setuptools_build_meta +inherit pypi python_setuptools_build_meta ptest-python-pytest RDEPENDS:${PN} += " \ - python3-fcntl \ - python3-json \ - python3-logging \ - python3-pprint \ - python3-terminal \ - python3-unittest \ - python3-unixadmin \ + python3-fcntl \ + python3-json \ + python3-logging \ + python3-pprint \ + python3-terminal \ + python3-unittest \ + python3-unixadmin \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-pytest-benchmark \ + python3-core \ + python3-io \ + python3-pytest-relaxed \ + python3-icecream \ + python3-unittest \ + python3-unittest-automake-output \ "