testing: workaround pytest parser bug in pytest-atf-wrapper.

Reviewed by:	lwhsu, kp
Differential Revision: https://reviews.freebsd.org/D35614
MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2022-06-27 15:52:25 +00:00
parent 8010b7a78a
commit 9c42645a1e

View File

@ -137,13 +137,15 @@ class Handler {
if (flag_cleanup) { if (flag_cleanup) {
args.push_back("--atf-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()) { if (!src_dir.empty()) {
args.push_back("--atf-source-dir"); args.push_back("--atf-source-dir=" + src_dir);
args.push_back(src_dir);
} }
if (!dst_file.empty()) { if (!dst_file.empty()) {
args.push_back("--atf-file"); args.push_back("--atf-file=" + dst_file);
args.push_back(dst_file);
} }
for (auto &pair: kv_list) { for (auto &pair: kv_list) {
args.push_back("--atf-var"); args.push_back("--atf-var");