From 9c42645a1e4d6695730187aef0f1494394503624 Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Mon, 27 Jun 2022 15:52:25 +0000 Subject: [PATCH] testing: workaround pytest parser bug in pytest-atf-wrapper. Reviewed by: lwhsu, kp Differential Revision: https://reviews.freebsd.org/D35614 MFC after: 2 weeks --- libexec/atf/atf-pytest-wrapper/atf_pytest_wrapper.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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");