git: 1c97b8e2eb06 - stable/13 - testing: workaround pytest parser bug in pytest-atf-wrapper.

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Fri, 13 Jan 2023 21:25:28 UTC
The branch stable/13 has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=1c97b8e2eb06f643dd6393d7aee90ef4b7f07a47

commit 1c97b8e2eb06f643dd6393d7aee90ef4b7f07a47
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2022-06-27 15:52:25 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-01-13 21:24:10 +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
    
    (cherry picked from commit 9c42645a1e4d6695730187aef0f1494394503624)
---
 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");