git: 9c42645a1e4d - main - testing: workaround pytest parser bug in pytest-atf-wrapper.

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Mon, 27 Jun 2022 17:32:55 UTC
The branch main has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=9c42645a1e4d6695730187aef0f1494394503624

commit 9c42645a1e4d6695730187aef0f1494394503624
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2022-06-27 15:52:25 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2022-06-27 17:30:53 +0000

    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");