← Documentation index

PPTEST_REGRESSION

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
ENVIRONMENT
SEE ALSO
AUTHOR
COPYRIGHT

NAME

pptest_regression - broad, multi-circuit placement and render regression sweep

SYNOPSIS

pptest_regression [--kicad-cli CMD] [--quiet]
pptest_regression
{--help|--version}

DESCRIPTION

pptest_regression is this project’s own real verification tool for auto_layout.py, render.py, and breadboard_lib.py together: the broad sweep this project had been running by hand, from scratch, every single development session, with no saved baseline surviving between sessions — every regression actually found this way (an "accidental short" from a bin-packing bug, a regression on one circuit’s own "3sector-tight" configuration, two separate margin-calculation regressions) was only ever caught by running this exact sweep manually. This script makes it permanent.

Checks two things, against this project’s own seven real, standard test circuits (two self-authored synthetic circuits, five real, external KiCad demo circuits already checked into TestSchemes):

•

Placement. Each of the seven circuits against five real, standard board_config variations (35 combinations total) — confirms bounds_ok, conn_ok, and the exact unplaced-component count each combination is already known to produce, against ground truth recorded directly in this script’s own EXPECTED_RESULTS table.

•

Rendering. Each of the seven circuits, under one real, genuinely adequate board_config — confirms render()’s own combined result (no hole collision, no label overlap) is clean.

Deliberately absolute assertions, not a snapshot/diff against a saved baseline file: a genuine, intentional improvement to the placement algorithm can legitimately change which components end up unplaced, or even reduce the unplaced count, without that being a regression at all — a snapshot diff would need re-approving every time, while an absolute assertion only fails when something actually breaks. When a real, intentional change alters one of these expected values, update EXPECTED_RESULTS directly, in the script itself, the same way any other pptest_*(1) script’s own ground truth gets updated after a verified, intentional change.

Needs kicad-cli(1): this exercises the full real pipeline, netlist through layout through render, the same real dependency pptest_netlist(1) and pptest_build_instructions(1) already have.

Run this after any change to auto_layout.py, render.py, or breadboard_lib.py itself. It is also what make check runs as part of this project’s own real test suite — last in that target, since it depends on both packpay-example-circuit1.kicad_sch and packpay-example-circuit2.kicad_sch already having been written by ppexample_circuit1(1) and ppexample_circuit2(1), earlier in the same make check run.

OPTIONS

--kicad-cli CMD

The kicad-cli(1) command to use. Default: the KICAD_CLI environment variable if set, else kicad-cli on PATH.

--version

Show this project’s own current version (read from VERSION) and exit.

--quiet

Suppress the section header lines. Every [ok]/[FAIL] check result, and the final summary, are still printed — this silences routine narration only, never a real result.

--phases N

Cut the checks into N phases of about equal duration (balanced by the measured seconds of each) and run only the one chosen with --phase. make check runs every phase, as the targets check4 to check13.

--phase K

With --phases, run phase K (1 to N).

--only A,B

Run only these check functions, by name.

--list

Print the checks that would run, with their weights in seconds, and exit.

--timings

Print, after each check, the seconds it took.

EXIT STATUS

0

Every check passed.

1

At least one check failed.

2

Invalid command-line usage.

ENVIRONMENT

PACKPAY_GUI_CHECK

Set to 1 to run check_hierarchy_loads_in_gui, which opens a multi-sheet schematic in the KiCad editor on a virtual display and fails if it shows its repair dialog. It takes about three minutes and needs xvfb-run, xdotool, ImageMagick’s import and the KiCad AppImage; where one is missing it skips itself. Off unless set.

SEE ALSO

ppauto_layout(1), pprender(1), pptest_netlist(1), pptest_breadboard_config(1), pptest_build_instructions(1), ResearchJournal.org in packpay’s own documentation set (see Index.org).

AUTHOR

Péter Felecan <pfelecan@gmail.com>, with development assistance from Claude (Anthropic).

COPYRIGHT

Copyright © 2026 Péter Felecan. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.