HomeFreeBSD

testing: pass ATF vars to pytest via env instead of arguments.

Description

testing: pass ATF vars to pytest via env instead of arguments.

This change is a continuation of 9c42645a1e4d workaround.
Apparently pytest argument parser is not happy when parsing values
with spaces or just more than one --atf-var argument.
Switch wrapper to send these kv pairs as env variables. Specifically,
use _ATF_VAR_key=value format to distinguish from the other vars.

Add the atf_vars fixture returning all passed kv pairs as a dict.

Reviewed by: lwhsu
Differential Revision: https://reviews.freebsd.org/D35625
MFC after: 2 weeks

(cherry picked from commit 513ce835b55831d343185e03a51efa2901405ac8)

Details

Provenance
melifaroAuthored on Jun 28 2022, 10:49 AM
Reviewer
lwhsu
Differential Revision
D35625: testing: pass ATF vars to pytest via env instead of arguments.
Parents
rG1c97b8e2eb06: testing: workaround pytest parser bug in pytest-atf-wrapper.
Branches
Unknown
Tags
Unknown