489 Commits

Author SHA1 Message Date
Seth Hillbrand
15ca4b1ba2 Extract symbol connectivity routine and add QA 2025-08-03 08:09:01 -07:00
Seth Hillbrand
7102b2d5e5 Clarify some driver sorting logic and add addl QA 2025-08-03 06:46:28 -07:00
Seth Hillbrand
1a25f07c76 Add QA for connection graph resolve drivers 2025-08-02 20:38:54 -07:00
Seth Hillbrand
15166a9f14 Refactor REFDES_TRACKER
Keep state for reuse in the class.  This allows us to properly pick the
value when fully reannotating

Don't annotate when placing new units.  Just step ahead in the unit
value while keeping the refdes number constant.  This eliminates the
jumping around to unplaced units when placing new multi-unit symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21378
2025-07-25 16:16:09 -07:00
Seth Hillbrand
e387953490 ADDED refdes tracker
Provide an option to track ever reference designator ever used in the
project to prevent its reuse even if the component has been removed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13052
2025-07-23 14:28:33 -07:00
Seth Hillbrand
2aeecec9bd Remove Creepage generation from reporting
Recalculating creepeage every time we reported a new clearance error was
unneccesarily complex.  Since the clearance errors are always straight
lines, we just need to calculate the closest approach and present that
segment
2025-07-21 14:10:34 -07:00
Seth Hillbrand
4c03ab8ebb Finally remove other_math routines
Replace with standard SEG and VECTOR2 alternatives.  Add QA test for
additional SEG-line intersection routine
2025-07-21 11:03:17 -07:00
Seth Hillbrand
0459c54a92 Cleanup and clarify SEG::intersect and SEG::Collide
Fix handling of end point intersection case
Fix degenerate handling
Fix overflow cases
Simplify logic in SEG::Collide
Remove overly simplistic check for intersection

Add multiple QA regression tests
2025-07-21 11:03:17 -07:00
Seth Hillbrand
3a06de0076 Consolidate ERC label warnings
If global or local labels are floating -> error
If global or local labels are only connected to one pin -> warning

Rather than forcing two different errors depending on whether the label
is local or global
2025-07-18 16:47:25 -07:00
jean-pierre charras
67aaac48e7 Fix a compil and a Coverity warning 2025-07-12 18:27:19 +02:00
Mark Roszko
1ab8a5944b Add tiny test for IsCopperLayerLowerThan 2025-07-06 11:10:39 -04:00
Christopher Alexander
f4b1a15cd8 fix for issue 17429 - fixes DRC unconnected items exclusion instability 2025-06-25 17:03:35 +00:00
jean-pierre charras
ea12df80be make board area colored (from Ethan Chien) 2025-06-19 18:26:39 +02:00
Jon Evans
9b72e30a0b QA: Store SVGs, not PNGs
Different platforms/versions can result in very slight differences
when converting SVGs to PNGs for diffing them.

(cherry picked from commit 8b80853ad7269460a68b20ed9f2a0fd33a8cfef8)
2025-06-14 17:16:25 -04:00
John Beard
d15b2b7305 SHAPE_ARC: Fix GetCentralAngle normalization documentation
This appears to have always been [-360 .. 360], as some tests in
test_shape_arc.cpp have had negative values for a very long time.

Add tests on the start, end and central angle accessors to enforce
the documented normalizations.
2025-06-08 09:55:54 +08:00
John Beard
026eb2512d QA Arc: update 'bad midpoint' test case after fix (2124f2b846) 2025-06-08 09:55:54 +08:00
Marek Roszko
4ada004bb4 Add some checkpoints to qa_pcbnew 2025-06-07 15:02:52 -04:00
Jeff Young
d81e9e6cd1 Code cleanup.
A placement-area is a rule-area sub-type.  We don't
need to say rule-area-placement each time.

Also removes some dead code, and simplifies some
damage-propagation logic.
2025-06-07 17:44:00 +01:00
Marek Roszko
f6c305cea6 Allow QA to create new SCHEMATIC instances rather than reusing a single container
Why make cleanup complicated lol
2025-06-07 10:38:43 -04:00
Seth Hillbrand
ed67d37480 If we can't load the KiCad, don't crash
We already fail the test, so just continue instead of segfaulting the qa
2025-06-05 11:40:47 -07:00
Marek Roszko
fa687289bf Fix qa and make SCHEMATIC::Reset safe on null projects 2025-06-01 21:04:58 -04:00
John Beard
98efdaea5e QA Arc: add a test of SHAPE_ARC start/mid/end construction
Also add an expected-failure for an arc where a bad midpoint
should be corrected or rejected by the SHAPE_ARC constructor

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/21035
2025-05-31 19:30:23 +08:00
John Beard
1ad03f5717 QA: Fix angle-equality predicate
This was sometimes accepting a wrong value on the "other side" of
the correct value. Only actually affected one test, which is fixed.
2025-05-31 19:29:02 +08:00
Jeff Young
ed1b4f6e5a Better and more complete recursion guards.
(ie: ones that actually work.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20990
2025-05-24 22:39:03 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Seth Hillbrand
9bedb6eedb Fix silk board edge collision case
First, fix the error limit check in drc_test_provider_edge_clearance.
Then, we rotate the final point incorrectly in SHAPE_ARC::Collide (need
negative angle).  We were not checking this result in the QA, so add the
proper tests
2025-05-19 17:49:03 -07:00
Wayne Stambaugh
d16d2f5a5b Fix a cadre of symbol pin alternate issues.
Prevent the file formatter from writing and the file parser from loading
symbol pin alternates that have an empty name or when the alternate name
is the same as the default pin name.  Apparently at some point they were
able to be created and saved.

Do not allow SCH_PIN::SetAlt() to set an alternate name when the name
does not exist in the library symbol pin alternate list.  This required
fixing the associated QA test.

When updating or changing schematic symbols from library, reset the pin
alternate to the default when the alternate no longer exists in the
symbol.

Do not populate pin alternates context menu with duplicate default pin.

Clear orphaned pin alternates to the default when saving symbols from
symbol editor.
2025-05-17 14:20:07 -04:00
Jeff Young
4cd2e947a1 Slice() must also support aMaxError.
In some cases arcs are re-inserted.
2025-05-13 12:03:41 +01:00
Jeff Young
7f4853b8a5 Third go at fixing the kimath test. 2025-05-13 09:57:13 +01:00
Jeff Young
acf1dca1e1 Another go at fixing the kimath test. 2025-05-13 08:45:50 +01:00
Jeff Young
a95f5172c9 Formatting. 2025-05-12 21:59:37 +01:00
Jeff Young
32cd142c39 Allow math tests to run with their own precision. 2025-05-12 21:57:52 +01:00
Michal Suchanek
df33ec79f7 test_ki_any: Add missing cstdint include
This is probably pulled in by some of the other includes for some build
configurations, but not always.
2025-05-11 15:50:10 +00:00
John Beard
4c8b971021 Eeschema: Symbol editor: pin table CSV interchange
This adds the ability to export the pin table content to a CSV file
or the clipboard as CSV, then re-import it from CSV or TSV. This allows:

* to round-trip pin table data via a spreadsheet program, so that the pin
  data can be manipulated in a richer/more familiar editing environment
* an import method to bring in tabular pin data from other formats
  "semi-automatically", without having to write a full-blown symbol generator.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/19207
2025-05-03 23:22:35 +08:00
Marek Roszko
3c08066f99 Shift the qa path setup to ENVIRONMENT_MODIFICATION due to no complaints over cmake 3.22 min 2025-05-02 18:49:48 -04:00
Marek Roszko
e8a6fff5b0 Make the vcpkg bin depend on build type for the path mod 2025-05-02 18:49:48 -04:00
Marek Roszko
83f9dc56d0 Add missing numpy requirement to tests/requirements.txt 2025-05-01 21:44:03 -04:00
Marek Roszko
74c79446a8 Add checkpoints to netlist testing 2025-05-01 21:20:20 -04:00
Marek Roszko
3a32ab30ed Add test from removed dup 2025-05-01 21:16:03 -04:00
Marek Roszko
784a115b3a Dont use boost_check_message for a log as it affects the last checkpoint record 2025-05-01 21:15:50 -04:00
Marek Roszko
c3f733909f Remove test files not actually being used and upped 2025-05-01 21:15:23 -04:00
Marek Roszko
a7b3d5454e Add another file open ReadAll check in qa 2025-05-01 20:04:32 -04:00
Marek Roszko
880ca01ff7 Add a simple file isopened guard
The saga of why the docker container fails QA continues
2025-04-30 23:17:25 -04:00
Wayne Stambaugh
bebc9669ad Fix ERC QA failures caused by hierarchical label root sheet test. 2025-04-29 17:46:39 -04:00
Jeff Young
b01fef5ca8 Update visibility flag when adding fields.
Also removes extra c'tor which fails to set the
ordinal.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20556
2025-04-26 16:37:36 +01:00
John Beard
1b1623885c PCB array tool: don't count array source pad as reserving its number
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20722
2025-04-23 23:32:20 +08:00
JamesJCode
eb17ebee4e Implement time-domain length tuning
- Adds time and delay units
- Adds time domain tuning parameters entry and storage
- Adds pad-to-die delay property
- Adds time domain parameter interface for length / delay calculations
- Adds unit tracking for numerical constants through LIBEVAL
   - Will need future work to truly propagate through binary expressions
- Adds time domain tuning to meander placers
- Adds time delay display to net inspector panel
- Modifies DRC to handle time domain constraints
2025-04-17 21:46:56 +01:00
Mike Williams
b9013b87d0 sch groups: add test case for loading from file 2025-04-15 10:19:40 -04:00
Mike Williams
5db091fc79 sch groups: clear group membership on destruction, add tests 2025-04-15 10:14:38 -04:00
Jeff Young
38c822db9c Use individual silk/mask collision checking if solder mask min width is 0.
Using the combinde solder mask doesn't deal well
with exclusions since almost any change will affect
the combined mask.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17429
2025-04-14 14:05:35 +01:00