-
Krisjanis Rijnieks authoredKrisjanis Rijnieks authored
Tests
Some test scripts to automate way of making sure that (almost) everything works as expected.
Inventory Test
A shell script inventory.sh
that loads the Fab inventory and checks that all electronics parts in the inventory are covered by the library.
Usage:
./inventory.sh ../fab.kicad_sym ./whitelist.txt
The whitelist.txt
file is there for the script to skip certain parts that are not electronic components, such as Amphenol ICC (FCI) 71600-104LF ribbon cable connector, for example.
Symbols Test
The symbols test uses the KiCad Library Utilities to test library symbols according to KLC rules.
Usage:
git clone --depth=1 https://gitlab.com/kicad/libraries/kicad-library-utils
cd kicad-library-utils/klc-check
./check_symbol.py ../../fab.kicad_sym -p '^(?!.*PWR_FLAG).*$' -vv
The -p '^(?!.*PWR_FLAG).*$'
is a pattern that excludes the PWR_FLAG symbol. In a similar way other symbols or groups of symbols can be excluded to exclude specific tests.
TODO: Check each component category differently. For example KiCad connectors are not always centered beacuse they have to be on a 2.54mm grid always. It would make it easier if each symbol group would be its separate library.