git: 06185987d36f - stable/13 - atf_pytest_wrapper: fix use with pytest-7.4
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Aug 2023 14:08:23 UTC
The branch stable/13 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=06185987d36ffdeff4e34608bb910fe629c76da5
commit 06185987d36ffdeff4e34608bb910fe629c76da5
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-07-18 14:20:47 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-08-04 14:08:05 +0000
atf_pytest_wrapper: fix use with pytest-7.4
As of pytest 7.4 it no longer walks all the way to the root directory
of the file system to find conftest files. As a result we don't find /
usr/tests/conftest.py, and don't load atf_python. That in turn causes
atf_python tests to fail.
Explicitly set the confcutdir, as advised by the pytest changelog.
See also: https://github.com/pytest-dev/pytest/pull/11043
MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D41064
(cherry picked from commit 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
---
libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp b/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp
index 78b045b9775f..b0cc600bde21 100644
--- a/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp
+++ b/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp
@@ -141,6 +141,8 @@ class Handler {
std::vector<std::string> args = {"pytest", "-vv", "-p",
"no:cacheprovider", "-s", "--atf"};
+ args.push_back("--confcutdir=" + python_path);
+
if (flag_list) {
args.push_back("--co");
args.push_back(script_path);