QA: Add kicad-cli pcb export gerber tests

This commit is contained in:
Roberto Fernandez Bautista 2023-08-26 12:33:45 +02:00
parent 2c10d5e3a0
commit f49125da31
9 changed files with 77375 additions and 40 deletions

View File

@ -145,6 +145,7 @@ fedora_report_metrics_public:
- .only_code
before_script:
- if [ "$TEST" == "cli" ] || [ "$TEST" == "python" ]; then python3 -m pip install -r qa/tests/requirements.txt; fi
- if [ "$TEST" == "cli" ]; then sudo dnf -y install gerbv; fi
parallel:
matrix:
# The name of the test without the qa_ prefix

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,777 @@
G04 #@! TF.FileFunction,Copper,L1,Top,Signal*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 4.0.7) date 09/01/23 19:02:20*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%ADD10C,0.150000*%
%ADD11C,0.381000*%
%ADD12C,0.304800*%
%ADD13R,5.080000X1.524000*%
%ADD14C,3.810000*%
%ADD15R,3.810000X3.810000*%
%ADD16C,1.524000*%
%ADD17R,1.397000X1.397000*%
%ADD18C,1.397000*%
%ADD19R,2.286000X1.574800*%
%ADD20O,2.286000X1.574800*%
%ADD21R,5.080000X1.778000*%
%ADD22C,1.778000*%
%ADD23C,0.635000*%
%ADD24C,1.016000*%
G04 APERTURE END LIST*
D10*
D11*
X152055286Y-101400429D02*
X152926143Y-101400429D01*
X152490714Y-102924429D02*
X152490714Y-101400429D01*
X153434143Y-102924429D02*
X153434143Y-101400429D01*
X153942143Y-102489000D01*
X154450143Y-101400429D01*
X154450143Y-102924429D01*
X155103286Y-102851857D02*
X155321000Y-102924429D01*
X155683857Y-102924429D01*
X155829000Y-102851857D01*
X155901571Y-102779286D01*
X155974143Y-102634143D01*
X155974143Y-102489000D01*
X155901571Y-102343857D01*
X155829000Y-102271286D01*
X155683857Y-102198714D01*
X155393571Y-102126143D01*
X155248429Y-102053571D01*
X155175857Y-101981000D01*
X155103286Y-101835857D01*
X155103286Y-101690714D01*
X155175857Y-101545571D01*
X155248429Y-101473000D01*
X155393571Y-101400429D01*
X155756429Y-101400429D01*
X155974143Y-101473000D01*
X156627286Y-102343857D02*
X157788429Y-102343857D01*
X158514143Y-102924429D02*
X158514143Y-101400429D01*
X159094715Y-101400429D01*
X159239857Y-101473000D01*
X159312429Y-101545571D01*
X159385000Y-101690714D01*
X159385000Y-101908429D01*
X159312429Y-102053571D01*
X159239857Y-102126143D01*
X159094715Y-102198714D01*
X158514143Y-102198714D01*
X160909000Y-102924429D02*
X160401000Y-102198714D01*
X160038143Y-102924429D02*
X160038143Y-101400429D01*
X160618715Y-101400429D01*
X160763857Y-101473000D01*
X160836429Y-101545571D01*
X160909000Y-101690714D01*
X160909000Y-101908429D01*
X160836429Y-102053571D01*
X160763857Y-102126143D01*
X160618715Y-102198714D01*
X160038143Y-102198714D01*
X161852429Y-101400429D02*
X162142715Y-101400429D01*
X162287857Y-101473000D01*
X162433000Y-101618143D01*
X162505572Y-101908429D01*
X162505572Y-102416429D01*
X162433000Y-102706714D01*
X162287857Y-102851857D01*
X162142715Y-102924429D01*
X161852429Y-102924429D01*
X161707286Y-102851857D01*
X161562143Y-102706714D01*
X161489572Y-102416429D01*
X161489572Y-101908429D01*
X161562143Y-101618143D01*
X161707286Y-101473000D01*
X161852429Y-101400429D01*
X163957000Y-101473000D02*
X163811857Y-101400429D01*
X163594143Y-101400429D01*
X163376428Y-101473000D01*
X163231286Y-101618143D01*
X163158714Y-101763286D01*
X163086143Y-102053571D01*
X163086143Y-102271286D01*
X163158714Y-102561571D01*
X163231286Y-102706714D01*
X163376428Y-102851857D01*
X163594143Y-102924429D01*
X163739286Y-102924429D01*
X163957000Y-102851857D01*
X164029571Y-102779286D01*
X164029571Y-102271286D01*
X163739286Y-102271286D01*
X153071286Y-95685429D02*
X153942143Y-95685429D01*
X153506714Y-97209429D02*
X153506714Y-95685429D01*
X155321000Y-97064286D02*
X155248429Y-97136857D01*
X155030715Y-97209429D01*
X154885572Y-97209429D01*
X154667857Y-97136857D01*
X154522715Y-96991714D01*
X154450143Y-96846571D01*
X154377572Y-96556286D01*
X154377572Y-96338571D01*
X154450143Y-96048286D01*
X154522715Y-95903143D01*
X154667857Y-95758000D01*
X154885572Y-95685429D01*
X155030715Y-95685429D01*
X155248429Y-95758000D01*
X155321000Y-95830571D01*
X155974143Y-97209429D02*
X155974143Y-95685429D01*
X156845000Y-97209429D02*
X156191857Y-96338571D01*
X156845000Y-95685429D02*
X155974143Y-96556286D01*
X157498143Y-96628857D02*
X158659286Y-96628857D01*
X160255857Y-97064286D02*
X160183286Y-97136857D01*
X159965572Y-97209429D01*
X159820429Y-97209429D01*
X159602714Y-97136857D01*
X159457572Y-96991714D01*
X159385000Y-96846571D01*
X159312429Y-96556286D01*
X159312429Y-96338571D01*
X159385000Y-96048286D01*
X159457572Y-95903143D01*
X159602714Y-95758000D01*
X159820429Y-95685429D01*
X159965572Y-95685429D01*
X160183286Y-95758000D01*
X160255857Y-95830571D01*
X161779857Y-97064286D02*
X161707286Y-97136857D01*
X161489572Y-97209429D01*
X161344429Y-97209429D01*
X161126714Y-97136857D01*
X160981572Y-96991714D01*
X160909000Y-96846571D01*
X160836429Y-96556286D01*
X160836429Y-96338571D01*
X160909000Y-96048286D01*
X160981572Y-95903143D01*
X161126714Y-95758000D01*
X161344429Y-95685429D01*
X161489572Y-95685429D01*
X161707286Y-95758000D01*
X161779857Y-95830571D01*
X163158714Y-97209429D02*
X162433000Y-97209429D01*
X162433000Y-95685429D01*
X153869572Y-90605429D02*
X154740429Y-90605429D01*
X154305000Y-92129429D02*
X154305000Y-90605429D01*
X155248429Y-92129429D02*
X155248429Y-90605429D01*
X155611286Y-90605429D01*
X155829001Y-90678000D01*
X155974143Y-90823143D01*
X156046715Y-90968286D01*
X156119286Y-91258571D01*
X156119286Y-91476286D01*
X156046715Y-91766571D01*
X155974143Y-91911714D01*
X155829001Y-92056857D01*
X155611286Y-92129429D01*
X155248429Y-92129429D01*
X156772429Y-92129429D02*
X156772429Y-90605429D01*
X157498143Y-91548857D02*
X158659286Y-91548857D01*
X159167286Y-90605429D02*
X160038143Y-90605429D01*
X159602714Y-92129429D02*
X159602714Y-90605429D01*
X160546143Y-92129429D02*
X160546143Y-90605429D01*
X161271857Y-92129429D02*
X161271857Y-90605429D01*
X162142714Y-92129429D01*
X162142714Y-90605429D01*
X152127858Y-85525429D02*
X152998715Y-85525429D01*
X152563286Y-87049429D02*
X152563286Y-85525429D01*
X153506715Y-87049429D02*
X153506715Y-85525429D01*
X153869572Y-85525429D01*
X154087287Y-85598000D01*
X154232429Y-85743143D01*
X154305001Y-85888286D01*
X154377572Y-86178571D01*
X154377572Y-86396286D01*
X154305001Y-86686571D01*
X154232429Y-86831714D01*
X154087287Y-86976857D01*
X153869572Y-87049429D01*
X153506715Y-87049429D01*
X155321001Y-85525429D02*
X155611287Y-85525429D01*
X155756429Y-85598000D01*
X155901572Y-85743143D01*
X155974144Y-86033429D01*
X155974144Y-86541429D01*
X155901572Y-86831714D01*
X155756429Y-86976857D01*
X155611287Y-87049429D01*
X155321001Y-87049429D01*
X155175858Y-86976857D01*
X155030715Y-86831714D01*
X154958144Y-86541429D01*
X154958144Y-86033429D01*
X155030715Y-85743143D01*
X155175858Y-85598000D01*
X155321001Y-85525429D01*
X156627286Y-86468857D02*
X157788429Y-86468857D01*
X158514143Y-87049429D02*
X158514143Y-85525429D01*
X158877000Y-85525429D01*
X159094715Y-85598000D01*
X159239857Y-85743143D01*
X159312429Y-85888286D01*
X159385000Y-86178571D01*
X159385000Y-86396286D01*
X159312429Y-86686571D01*
X159239857Y-86831714D01*
X159094715Y-86976857D01*
X158877000Y-87049429D01*
X158514143Y-87049429D01*
X160328429Y-85525429D02*
X160618715Y-85525429D01*
X160763857Y-85598000D01*
X160909000Y-85743143D01*
X160981572Y-86033429D01*
X160981572Y-86541429D01*
X160909000Y-86831714D01*
X160763857Y-86976857D01*
X160618715Y-87049429D01*
X160328429Y-87049429D01*
X160183286Y-86976857D01*
X160038143Y-86831714D01*
X159965572Y-86541429D01*
X159965572Y-86033429D01*
X160038143Y-85743143D01*
X160183286Y-85598000D01*
X160328429Y-85525429D01*
X161634714Y-87049429D02*
X161634714Y-85525429D01*
X162505571Y-87049429D01*
X162505571Y-85525429D01*
X163231285Y-86251143D02*
X163739285Y-86251143D01*
X163956999Y-87049429D02*
X163231285Y-87049429D01*
X163231285Y-85525429D01*
X163956999Y-85525429D01*
X160528000Y-75365429D02*
X161036000Y-76889429D01*
X161544000Y-75365429D01*
X162922857Y-76744286D02*
X162850286Y-76816857D01*
X162632572Y-76889429D01*
X162487429Y-76889429D01*
X162269714Y-76816857D01*
X162124572Y-76671714D01*
X162052000Y-76526571D01*
X161979429Y-76236286D01*
X161979429Y-76018571D01*
X162052000Y-75728286D01*
X162124572Y-75583143D01*
X162269714Y-75438000D01*
X162487429Y-75365429D01*
X162632572Y-75365429D01*
X162850286Y-75438000D01*
X162922857Y-75510571D01*
X164446857Y-76744286D02*
X164374286Y-76816857D01*
X164156572Y-76889429D01*
X164011429Y-76889429D01*
X163793714Y-76816857D01*
X163648572Y-76671714D01*
X163576000Y-76526571D01*
X163503429Y-76236286D01*
X163503429Y-76018571D01*
X163576000Y-75728286D01*
X163648572Y-75583143D01*
X163793714Y-75438000D01*
X164011429Y-75365429D01*
X164156572Y-75365429D01*
X164374286Y-75438000D01*
X164446857Y-75510571D01*
X161398858Y-80518000D02*
X161253715Y-80445429D01*
X161036001Y-80445429D01*
X160818286Y-80518000D01*
X160673144Y-80663143D01*
X160600572Y-80808286D01*
X160528001Y-81098571D01*
X160528001Y-81316286D01*
X160600572Y-81606571D01*
X160673144Y-81751714D01*
X160818286Y-81896857D01*
X161036001Y-81969429D01*
X161181144Y-81969429D01*
X161398858Y-81896857D01*
X161471429Y-81824286D01*
X161471429Y-81316286D01*
X161181144Y-81316286D01*
X162124572Y-81969429D02*
X162124572Y-80445429D01*
X162995429Y-81969429D01*
X162995429Y-80445429D01*
X163721143Y-81969429D02*
X163721143Y-80445429D01*
X164084000Y-80445429D01*
X164301715Y-80518000D01*
X164446857Y-80663143D01*
X164519429Y-80808286D01*
X164592000Y-81098571D01*
X164592000Y-81316286D01*
X164519429Y-81606571D01*
X164446857Y-81751714D01*
X164301715Y-81896857D01*
X164084000Y-81969429D01*
X163721143Y-81969429D01*
D12*
X113828286Y-70394286D02*
X113755715Y-70466857D01*
X113538001Y-70539429D01*
X113392858Y-70539429D01*
X113175143Y-70466857D01*
X113030001Y-70321714D01*
X112957429Y-70176571D01*
X112884858Y-69886286D01*
X112884858Y-69668571D01*
X112957429Y-69378286D01*
X113030001Y-69233143D01*
X113175143Y-69088000D01*
X113392858Y-69015429D01*
X113538001Y-69015429D01*
X113755715Y-69088000D01*
X113828286Y-69160571D01*
X114699143Y-70539429D02*
X114554001Y-70466857D01*
X114481429Y-70394286D01*
X114408858Y-70249143D01*
X114408858Y-69813714D01*
X114481429Y-69668571D01*
X114554001Y-69596000D01*
X114699143Y-69523429D01*
X114916858Y-69523429D01*
X115062001Y-69596000D01*
X115134572Y-69668571D01*
X115207143Y-69813714D01*
X115207143Y-70249143D01*
X115134572Y-70394286D01*
X115062001Y-70466857D01*
X114916858Y-70539429D01*
X114699143Y-70539429D01*
X115860286Y-70539429D02*
X115860286Y-69523429D01*
X115860286Y-69668571D02*
X115932858Y-69596000D01*
X116078000Y-69523429D01*
X116295715Y-69523429D01*
X116440858Y-69596000D01*
X116513429Y-69741143D01*
X116513429Y-70539429D01*
X116513429Y-69741143D02*
X116586000Y-69596000D01*
X116731143Y-69523429D01*
X116948858Y-69523429D01*
X117094000Y-69596000D01*
X117166572Y-69741143D01*
X117166572Y-70539429D01*
X117892286Y-69523429D02*
X117892286Y-71047429D01*
X117892286Y-69596000D02*
X118037429Y-69523429D01*
X118327715Y-69523429D01*
X118472858Y-69596000D01*
X118545429Y-69668571D01*
X118618000Y-69813714D01*
X118618000Y-70249143D01*
X118545429Y-70394286D01*
X118472858Y-70466857D01*
X118327715Y-70539429D01*
X118037429Y-70539429D01*
X117892286Y-70466857D01*
X119488857Y-70539429D02*
X119343715Y-70466857D01*
X119271143Y-70394286D01*
X119198572Y-70249143D01*
X119198572Y-69813714D01*
X119271143Y-69668571D01*
X119343715Y-69596000D01*
X119488857Y-69523429D01*
X119706572Y-69523429D01*
X119851715Y-69596000D01*
X119924286Y-69668571D01*
X119996857Y-69813714D01*
X119996857Y-70249143D01*
X119924286Y-70394286D01*
X119851715Y-70466857D01*
X119706572Y-70539429D01*
X119488857Y-70539429D01*
X120650000Y-69523429D02*
X120650000Y-70539429D01*
X120650000Y-69668571D02*
X120722572Y-69596000D01*
X120867714Y-69523429D01*
X121085429Y-69523429D01*
X121230572Y-69596000D01*
X121303143Y-69741143D01*
X121303143Y-70539429D01*
X122609429Y-70466857D02*
X122464286Y-70539429D01*
X122174000Y-70539429D01*
X122028857Y-70466857D01*
X121956286Y-70321714D01*
X121956286Y-69741143D01*
X122028857Y-69596000D01*
X122174000Y-69523429D01*
X122464286Y-69523429D01*
X122609429Y-69596000D01*
X122682000Y-69741143D01*
X122682000Y-69886286D01*
X121956286Y-70031429D01*
X123335143Y-69523429D02*
X123335143Y-70539429D01*
X123335143Y-69668571D02*
X123407715Y-69596000D01*
X123552857Y-69523429D01*
X123770572Y-69523429D01*
X123915715Y-69596000D01*
X123988286Y-69741143D01*
X123988286Y-70539429D01*
X124496286Y-69523429D02*
X125076857Y-69523429D01*
X124714000Y-69015429D02*
X124714000Y-70321714D01*
X124786572Y-70466857D01*
X124931714Y-70539429D01*
X125076857Y-70539429D01*
X126673429Y-70466857D02*
X126891143Y-70539429D01*
X127254000Y-70539429D01*
X127399143Y-70466857D01*
X127471714Y-70394286D01*
X127544286Y-70249143D01*
X127544286Y-70104000D01*
X127471714Y-69958857D01*
X127399143Y-69886286D01*
X127254000Y-69813714D01*
X126963714Y-69741143D01*
X126818572Y-69668571D01*
X126746000Y-69596000D01*
X126673429Y-69450857D01*
X126673429Y-69305714D01*
X126746000Y-69160571D01*
X126818572Y-69088000D01*
X126963714Y-69015429D01*
X127326572Y-69015429D01*
X127544286Y-69088000D01*
X128197429Y-70539429D02*
X128197429Y-69523429D01*
X128197429Y-69015429D02*
X128124858Y-69088000D01*
X128197429Y-69160571D01*
X128270001Y-69088000D01*
X128197429Y-69015429D01*
X128197429Y-69160571D01*
X129576286Y-70539429D02*
X129576286Y-69015429D01*
X129576286Y-70466857D02*
X129431143Y-70539429D01*
X129140857Y-70539429D01*
X128995715Y-70466857D01*
X128923143Y-70394286D01*
X128850572Y-70249143D01*
X128850572Y-69813714D01*
X128923143Y-69668571D01*
X128995715Y-69596000D01*
X129140857Y-69523429D01*
X129431143Y-69523429D01*
X129576286Y-69596000D01*
X130882572Y-70466857D02*
X130737429Y-70539429D01*
X130447143Y-70539429D01*
X130302000Y-70466857D01*
X130229429Y-70321714D01*
X130229429Y-69741143D01*
X130302000Y-69596000D01*
X130447143Y-69523429D01*
X130737429Y-69523429D01*
X130882572Y-69596000D01*
X130955143Y-69741143D01*
X130955143Y-69886286D01*
X130229429Y-70031429D01*
D13*
X105537000Y-105410000D03*
X105537000Y-102616000D03*
X105537000Y-99949000D03*
X105537000Y-97155000D03*
X105537000Y-94488000D03*
X105537000Y-91694000D03*
X105537000Y-88900000D03*
X105537000Y-86233000D03*
X105537000Y-83439000D03*
X105537000Y-80772000D03*
X105537000Y-77978000D03*
X105537000Y-75184000D03*
X105537000Y-72517000D03*
D14*
X170180000Y-81280000D03*
X170180000Y-86360000D03*
D15*
X170180000Y-76200000D03*
D14*
X170180000Y-91440000D03*
X170180000Y-96520000D03*
X170180000Y-101600000D03*
D16*
X137160000Y-72390000D03*
X147320000Y-72390000D03*
X121920000Y-76200000D03*
X111760000Y-76200000D03*
X162560000Y-88900000D03*
X152400000Y-88900000D03*
X151130000Y-73660000D03*
X161290000Y-73660000D03*
X121920000Y-83820000D03*
X111760000Y-83820000D03*
X121920000Y-92710000D03*
X111760000Y-92710000D03*
X121920000Y-86360000D03*
X111760000Y-86360000D03*
X121920000Y-81280000D03*
X111760000Y-81280000D03*
X121920000Y-78740000D03*
X111760000Y-78740000D03*
X162560000Y-93980000D03*
X152400000Y-93980000D03*
X162560000Y-99060000D03*
X152400000Y-99060000D03*
X162560000Y-105410000D03*
X152400000Y-105410000D03*
X121920000Y-104140000D03*
X111760000Y-104140000D03*
D17*
X134620000Y-76200000D03*
D18*
X147320000Y-76200000D03*
D17*
X152400000Y-78740000D03*
D18*
X160020000Y-78740000D03*
D17*
X127000000Y-72390000D03*
D18*
X134620000Y-72390000D03*
D19*
X140970000Y-82550000D03*
D20*
X140970000Y-85090000D03*
X140970000Y-87630000D03*
X140970000Y-90170000D03*
X140970000Y-92710000D03*
X140970000Y-95250000D03*
X140970000Y-97790000D03*
X148590000Y-97790000D03*
X148590000Y-95250000D03*
X148590000Y-92710000D03*
X148590000Y-90170000D03*
X148590000Y-87630000D03*
X148590000Y-85090000D03*
X148590000Y-82550000D03*
D19*
X127000000Y-82550000D03*
D20*
X127000000Y-85090000D03*
X127000000Y-87630000D03*
X127000000Y-90170000D03*
X127000000Y-92710000D03*
X127000000Y-95250000D03*
X127000000Y-97790000D03*
X134620000Y-97790000D03*
X134620000Y-95250000D03*
X134620000Y-92710000D03*
X134620000Y-90170000D03*
X134620000Y-87630000D03*
X134620000Y-85090000D03*
X134620000Y-82550000D03*
D18*
X140970000Y-102870000D03*
X140970000Y-107950000D03*
X151130000Y-69850000D03*
X156210000Y-69850000D03*
X144780000Y-102870000D03*
X144780000Y-107950000D03*
X148590000Y-102870000D03*
X148590000Y-107950000D03*
D21*
X181610000Y-85979000D03*
X181610000Y-88773000D03*
X181610000Y-91567000D03*
X181610000Y-94361000D03*
D22*
X177800000Y-81280000D03*
X139065000Y-100330000D03*
X124460000Y-87630000D03*
D23*
X110490000Y-78740000D02*
X109855000Y-78105000D01*
X109855000Y-78105000D02*
X106045000Y-78105000D01*
X111760000Y-78740000D02*
X110490000Y-78740000D01*
X106045000Y-78105000D02*
X105537000Y-77978000D01*
X109220000Y-83820000D02*
X105410000Y-83820000D01*
X109855000Y-85725000D02*
X109855000Y-84455000D01*
X110490000Y-86360000D02*
X109855000Y-85725000D01*
X105410000Y-83820000D02*
X105537000Y-83439000D01*
X111760000Y-86360000D02*
X110490000Y-86360000D01*
X109855000Y-84455000D02*
X109220000Y-83820000D01*
X111125000Y-105410000D02*
X105537000Y-105410000D01*
X111760000Y-104775000D02*
X111125000Y-105410000D01*
X111760000Y-104140000D02*
X111760000Y-104775000D01*
X107950000Y-86233000D02*
X109982000Y-88265000D01*
X109982000Y-88265000D02*
X113665000Y-88265000D01*
X113665000Y-88265000D02*
X114300000Y-87630000D01*
X114300000Y-87630000D02*
X114300000Y-84455000D01*
X105537000Y-86233000D02*
X107950000Y-86233000D01*
X113665000Y-83820000D02*
X111760000Y-83820000D01*
X114300000Y-84455000D02*
X113665000Y-83820000D01*
X114935000Y-92710000D02*
X116205000Y-91440000D01*
X106045000Y-75565000D02*
X105537000Y-75184000D01*
X111760000Y-92710000D02*
X114935000Y-92710000D01*
X116205000Y-74930000D02*
X115570000Y-74295000D01*
X106045000Y-74930000D02*
X106045000Y-75565000D01*
X115570000Y-74295000D02*
X109220000Y-74295000D01*
X108585000Y-74930000D02*
X106045000Y-74930000D01*
X109220000Y-74295000D02*
X108585000Y-74930000D01*
X116205000Y-91440000D02*
X116205000Y-74930000D01*
X109855000Y-80645000D02*
X106045000Y-80645000D01*
X111760000Y-81280000D02*
X110490000Y-81280000D01*
X106045000Y-80645000D02*
X105537000Y-80772000D01*
X110490000Y-81280000D02*
X109855000Y-80645000D01*
D24*
X177800000Y-81280000D02*
X180975000Y-81280000D01*
X180975000Y-81280000D02*
X181610000Y-81915000D01*
X181610000Y-85979000D02*
X181610000Y-81915000D01*
X181610000Y-88773000D02*
X181610000Y-85979000D01*
X181610000Y-91567000D02*
X181610000Y-88773000D01*
X181610000Y-94361000D02*
X181610000Y-91567000D01*
D23*
X105410000Y-102870000D02*
X105537000Y-102616000D01*
X109220000Y-102870000D02*
X105410000Y-102870000D01*
X105537000Y-99949000D02*
X109855000Y-99949000D01*
X109855000Y-99949000D02*
X109855000Y-100330000D01*
X109855000Y-100330000D02*
X109855000Y-102235000D01*
X109855000Y-102235000D02*
X109220000Y-102870000D01*
X109855000Y-92329000D02*
X109855000Y-100330000D01*
X105537000Y-91694000D02*
X109220000Y-91694000D01*
X109220000Y-91694000D02*
X109855000Y-92329000D01*
X135255000Y-104140000D02*
X121920000Y-104140000D01*
X139065000Y-100330000D02*
X135255000Y-104140000D01*
X144145000Y-77470000D02*
X144145000Y-74930000D01*
X143510000Y-78105000D02*
X144145000Y-77470000D01*
X144145000Y-74930000D02*
X144780000Y-74295000D01*
X146685000Y-74295000D02*
X147320000Y-73660000D01*
X124460000Y-87630000D02*
X124460000Y-80010000D01*
X147320000Y-73660000D02*
X147320000Y-72390000D01*
X144780000Y-74295000D02*
X146685000Y-74295000D01*
X126365000Y-78105000D02*
X143510000Y-78105000D01*
X124460000Y-80010000D02*
X126365000Y-78105000D01*
D24*
X137160000Y-72390000D02*
X142875000Y-72390000D01*
X142875000Y-72390000D02*
X145415000Y-69850000D01*
X149860000Y-73025000D02*
X150495000Y-73660000D01*
X148590000Y-69850000D02*
X149860000Y-71120000D01*
X145415000Y-69850000D02*
X148590000Y-69850000D01*
X150495000Y-73660000D02*
X151130000Y-73660000D01*
X149860000Y-71120000D02*
X149860000Y-73025000D01*
M02*

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -25,50 +25,113 @@ import utils
from pathlib import Path
import pytest
import re
from typing import List
from typing import List, Tuple
from conftest import KiTestFixture
@pytest.mark.parametrize("test_file,output_dir,layers_to_test",
[
("cli/artwork_generation_regressions/ZoneFill-4.0.7.kicad_pcb", "artwork_generation_regressions/ZoneFill-4.0.7", ["F.Cu","B.Cu"]),
("cli/artwork_generation_regressions/ZoneFill-Legacy.brd", "artwork_generation_regressions/ZoneFill-Legacy", ["F.Cu","B.Cu"])
])
def get_generated_path(kitest: KiTestFixture,
input_file: Path,
test_name: str,
layer_name: str,
) -> Tuple[Path, str]:
layer_name_fixed = "-" + layer_name.replace( ".", "_" )
generated_dir = str( kitest.get_output_path( "cli/{}/{}/".format( test_name, input_file.stem ) ) )
generated_name = input_file.stem + layer_name_fixed + "-generated" + input_file.suffix
generated_path = Path( generated_dir + "/" + generated_name )
if generated_path.exists():
generated_path.unlink() # Delete file
return [generated_path, layer_name_fixed]
def run_and_check_export_command(kitest: KiTestFixture,
command: List[str],
expected_output_file: Path):
assert not expected_output_file.exists()
stdout, stderr, exitcode = utils.run_and_capture( command )
assert exitcode == 0
# Don't assert stderr (legacy fills will have errors)
assert stdout is not None
assert expected_output_file.exists()
kitest.add_attachment( expected_output_file )
@pytest.mark.parametrize("test_file,layers_to_test",
[
(
"cli/artwork_generation_regressions/ZoneFill-4.0.7.kicad_pcb",
["F.Cu","B.Cu"]
),
( "cli/artwork_generation_regressions/ZoneFill-Legacy.brd",
["F.Cu","B.Cu"]
)
])
def test_pcb_export_svg( kitest: KiTestFixture,
test_file: str,
output_dir: str,
layers_to_test: List[str] ):
input_file = kitest.get_data_file_path( test_file )
for layername in layers_to_test:
layerNameFixed = "-" + layername.replace( ".", "_" )
generated_svg_dir = str( kitest.get_output_path( "cli/{}/".format( output_dir ) ) )
generated_svg_name = Path( input_file ).stem + layerNameFixed + "-generated.svg"
generated_svg_path = Path( generated_svg_dir + "/" + generated_svg_name )
for layer_name in layers_to_test:
generated_svg_path, layer_name_fixed = get_generated_path( kitest,
Path( input_file ).with_suffix( ".svg" ),
"export_svg",
layer_name )
command = ["kicad-cli", "pcb", "export", "svg", "--page-size-mode", "1",#Current page size
"--exclude-drawing-sheet", "--black-and-white", "--layers", layername]
command.append( "-o" )
command.append( str( generated_svg_path ) )
command.append( input_file )
command = ["kicad-cli", "pcb", "export", "svg", "--page-size-mode", "1", # 1=Current page size
"--exclude-drawing-sheet", "--black-and-white", "--layers", layer_name,
"-o", str(generated_svg_path), input_file]
if generated_svg_path.exists():
generated_svg_path.unlink()
assert not generated_svg_path.exists()
stdout, stderr, exitcode = utils.run_and_capture( command )
assert exitcode == 0
#don't assert stderr (legacy fills will have errors)
assert stdout is not None
assert generated_svg_path.exists()
kitest.add_attachment( generated_svg_path )
run_and_check_export_command( kitest, command, generated_svg_path )
svg_source_path = str( Path( input_file ).with_suffix( "" ) )
svg_source_path += layerNameFixed + ".svg"
svg_source_path += layer_name_fixed + ".svg"
# Comparison DPI = 1270 => 1px == 20um. I.e. allowable error of 60 um after eroding
assert utils.svgs_are_equivalent( str( generated_svg_path ), svg_source_path, 1270 )
@pytest.mark.skipif(not utils.is_gerbv_installed(), reason="Requires gerbv to be installed")
@pytest.mark.parametrize("test_file,layers_to_test,originInches,windowsizeInches",
[
(
"cli/artwork_generation_regressions/ZoneFill-4.0.7.kicad_pcb",
["F.Cu","B.Cu"],
( 3.5, -4.6 ),
( 4.3, 2.2 )
),
( "cli/artwork_generation_regressions/ZoneFill-Legacy.brd",
["F.Cu","B.Cu"],
( -0.6, -0.4 ),
( 1.7, 0.8 )
)
])
def test_pcb_export_gerber( kitest: KiTestFixture,
test_file: str,
layers_to_test: List[str],
originInches : Tuple[float, float],
windowsizeInches : Tuple[float, float] ):
input_file = kitest.get_data_file_path( test_file )
for layer_name in layers_to_test:
generated_gerber_path, layer_name_fixed = get_generated_path( kitest,
Path( input_file ).with_suffix( ".gbr" ),
"export_gerber",
layer_name )
command = ["kicad-cli", "pcb", "export", "gerber", "--no-x2", "--use-drill-file-origin",
"--layers", layer_name,
"-o", str(generated_gerber_path), input_file]
run_and_check_export_command( kitest, command, generated_gerber_path )
gbr_source_path = str( Path( input_file ).with_suffix( "" ) )
gbr_source_path += layer_name_fixed + ".gbr"
# Comparison DPI = 5080 => 1px == 5um. I.e. allowable error of 15 um after eroding
assert utils.gerbers_are_equivalent( str( generated_gerber_path ), gbr_source_path, 5080,
originInches, windowsizeInches )

View File

@ -63,11 +63,20 @@ def textdiff_files( golden_filepath: str, new_filepath: str, skip: int = 0 ) ->
return diff_text == ""
def image_is_blank( image_path: str ) -> bool:
# Increase limit to ~2GB uncompressed
Image.MAX_IMAGE_PIXELS=4 * 1024 * 1024 * 1024 // 4 // 3
img = Image.open( image_path )
sum = np.sum( np.asarray( img ) )
return sum == 0
def images_are_equal( image1_path: str, image2_path: str, alpha_colour = (50, 100, 50) ) -> bool:
# Note: if modifying this function - please add new tests for it in test_utils.py
# Increase limit to ~500MB uncompressed
Image.MAX_IMAGE_PIXELS=2 * 1024 * 1024 * 1024 // 4 // 3
# Increase limit to ~2GB uncompressed
Image.MAX_IMAGE_PIXELS=4 * 1024 * 1024 * 1024 // 4 // 3
image1 = Image.open( image1_path )
image2 = Image.open( image2_path )
@ -115,21 +124,66 @@ def images_are_equal( image1_path: str, image2_path: str, alpha_colour = (50, 10
return retval
def svgs_are_equivalent( svg_generated_path : str, svg_source_path : str, comparison_dpi : int ) -> bool:
def get_png_paths( generated_path: str, source_path : str ) -> Tuple[str, str]:
generated_png_path = Path( generated_path ).with_suffix( ".png" )
png_generated_path = Path( svg_generated_path ).with_suffix( ".png" )
if generated_png_path.exists():
generated_png_path.unlink() # Delete file
# store source png in same folder as generated, easier to compare
source_stem = Path( svg_source_path ).stem
png_source_path = Path( svg_generated_path ).with_stem( source_stem + "-source").with_suffix( ".png" )
source_stem = Path( source_path ).stem
source_png_path = Path( generated_path ).with_stem( source_stem + "-source").with_suffix( ".png" )
if source_png_path.exists():
source_png_path.unlink() # Delete file
return str( generated_png_path ), str( source_png_path )
def svgs_are_equivalent( svg_generated_path: str, svg_source_path: str, comparison_dpi: int ) -> bool:
png_generated, png_source = get_png_paths( svg_generated_path, svg_source_path )
cairosvg.svg2png( url=svg_generated_path,
write_to=str( png_generated_path ),
write_to=png_generated,
dpi=comparison_dpi )
cairosvg.svg2png( url=svg_source_path,
write_to=str( png_source_path ),
write_to=png_source,
dpi=comparison_dpi )
return images_are_equal( str( png_generated_path ), str( png_source_path ) )
return images_are_equal( png_generated , png_source )
def gerbers_are_equivalent( gerber_generated_path : str, gerber_source_path : str, comparison_dpi : int,
originInches : Tuple[float, float],
windowsizeInches : Tuple[float, float] ) -> bool:
png_generated, png_source = get_png_paths( gerber_generated_path, gerber_source_path )
convert_gerber_to_png( gerber_generated_path, png_generated, comparison_dpi, originInches, windowsizeInches )
convert_gerber_to_png( gerber_source_path, png_source, comparison_dpi, originInches, windowsizeInches )
assert( not image_is_blank( png_generated ) )
assert( not image_is_blank( png_source ) ) # make sure test case is generated correctly
return images_are_equal( png_generated, png_source )
def convert_gerber_to_png( gerber_path : str, png_path : str, dpi : int,
originInches : Tuple[float, float],
windowsizeInches : Tuple[float, float] ):
stdout, stderr, exitcode = run_and_capture(["gerbv", "--export=png", f"--dpi={dpi}",
f"--origin={originInches[0]}x{originInches[1]}",
f"--window_inch={windowsizeInches[0]}x{windowsizeInches[1]}",
f"--output={png_path}",
"--foreground=#FFFFFF", "--background=#000000",
gerber_path
])
def is_gerbv_installed() -> bool:
try:
stdout, stderr, exitcode = run_and_capture(["gerbv", "--version"])
except:
return False
return exitcode == 0 and stdout is not None and stdout.startswith("gerbv version")