Expand description
Find KiCad Monkey’s synthetic test cases.
Synthetic cases are small KiCad projects authored for one feature. They
live in git at tests/cases/<topic>/<case>/ in the KiCad Monkey source
tree, and each one is a whole project:
input/holds the.kicad_pro, the.kicad_schand the.kicad_pcb(the board may be blank);reference_output/holds the checked-in kicad-cli references, when the case has any;output/is ignored by git and holds results for people to look at;case_metadata.jsondescribes the case, hashes its files and records the kicad-cli version that made the references.
WN_KICAD_SYNTHETICS names the folder that holds the topics. When it is
unset or blank, the in-repo tests/cases folder is used, so the cases can
move later by changing only the variable. Python has the same resolver,
kicad_monkey.testing.synthetics, and the two behave alike.
Cases are shared test input: a test that runs kicad-cli (which writes a
.kicad_prl next to any project it opens) or writes anything else copies
the input to a temporary folder first.
Constants§
- CASE_
METADATA_ FILE - The file that makes a
<topic>/<case>/folder a case. - SYNTHETICS_
ENV - The environment variable that names the synthetic cases folder.
Functions§
- default_
synthetic_ cases_ root tests/casesof the KiCad Monkey source tree this crate was built from.- iter_
synthetic_ cases - Enumerate every
<topic>/<case>/folder holdingcase_metadata.json, sorted by(topic, case). WhentopicisSome, filters to that topic. - resolve_
synthetic_ cases_ root - The synthetic cases folder for a
WN_KICAD_SYNTHETICSvalue. - synthetic_
case - The
<topic>/<case>/folder, which holdscase_metadata.json. - synthetic_
cases_ root - The synthetic cases folder that
WN_KICAD_SYNTHETICSselects.