Skip to content

Commit

Permalink
atf_pytest_wrapper: fix use with pytest-7.4
Browse files Browse the repository at this point in the history
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:	pytest-dev/pytest#11043
MFC after:	3 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D41064
  • Loading branch information
kprovost committed Jul 21, 2023
1 parent 20fc5bf commit 9f23cbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f23cbd

Please sign in to comment.