diff --git a/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp b/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp index 11fd3c47d507..bc7eec3b851d 100644 --- a/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp +++ b/libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp @@ -137,13 +137,15 @@ class Handler { if (flag_cleanup) { args.push_back("--atf-cleanup"); } + // workaround pytest parser bug: + // https://github.com/pytest-dev/pytest/issues/3097 + // use '--arg=value' format instead of '--arg value' for all + // path-like options if (!src_dir.empty()) { - args.push_back("--atf-source-dir"); - args.push_back(src_dir); + args.push_back("--atf-source-dir=" + src_dir); } if (!dst_file.empty()) { - args.push_back("--atf-file"); - args.push_back(dst_file); + args.push_back("--atf-file=" + dst_file); } for (auto &pair: kv_list) { args.push_back("--atf-var");