FreeRouting ships no unit tests for its geometry/router, so there is no value-level oracle to port against. This adds a dev/test-only harness that runs the reference JAR to route a DSN, letting freeroute's output be diffed against the reference implementation — the router phase will assert connectivity parity (same nets routed) via routed_net_set(). - tests/oracle.py: locate Java 21+ and a freerouting JAR (env overrides: FREEROUTE_ORACLE_JAVA, FREEROUTING_JAR), route a DSN, and extract routed connectivity from the SES. requires_oracle skips when no JVM/JAR is present, so the suite stays Java-free. - tests/test_oracle.py: routes a routable board end-to-end and checks the connectivity extraction. - tests/dsn/fixtures/kicad_routable.dsn: a real KiCad pcbnew-exported DSN (Arduino_Mega template, path sanitized) that actually routes — the smd_demo fixture leaves its nets unrouted. - pyproject: pythonpath=["tests"] so the harness imports as `oracle`.
DSN test fixtures
Hand-crafted minimal Specctra DSN files, written to exercise the parser. They
are modeled on the real fixtures shipped in the upstream FreeRouting repo
(fixtures/empty_board.dsn and fixtures/SMD-routing-issue-demo.dsn) so the
grammar and formatting match what kicad-cli pcb export specctra-dsn and
FreeRouting itself produce, but they were typed fresh here (no upstream file is
copied into this tree).
empty_board.dsn— the smallest valid board: parser, resolution, unit, and a structure with two signal layers and apcbboundary path. Modeled on FreeRoutingfixtures/empty_board.dsn.smd_demo.dsn— a fuller board exercising every scope the parser handles: quoted board/padstack/image names,via, defaultrule(width + clearance with a(type smd_smd)pair), akeepout, padstacks (rect and circle pads), images with pins, placement withfront/rotation, nets withComp-Pinreferences, and aclasswithcircuit/use_viaand arule. Modeled on FreeRoutingfixtures/SMD-routing-issue-demo.dsn.