Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2022 17:32:55 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9c42645a1e4d - main - testing: workaround pytest parser bug in pytest-atf-wrapper.
Message-ID:  <202206271732.25RHWtCa055358@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206271732.25RHWtCa055358>