Skip to content
Snippets Groups Projects
Commit c5a8bc24 authored by Krisjanis Rijnieks's avatar Krisjanis Rijnieks :lion_face:
Browse files

Unclude symbol tests using KiCad Library Utilities

parent d42f01cb
No related branches found
No related tags found
No related merge requests found
Pipeline #384058 passed
......@@ -7,7 +7,9 @@ before_script:
- apt update && apt install -y jq
- python -V
- jq --version
- git clone --depth=1 https://gitlab.com/kicad/libraries/kicad-library-utils
test:
script:
- ./tests/inventory.sh ./fab.kicad_sym ./tests/whitelist.txt
- ./tests/symbols.sh
......@@ -11,4 +11,19 @@ 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](https://www.digikey.fi/en/products/detail/amphenol-cs-fci/71600-104LF/1523943) ribbon cable connector, for example.
\ No newline at end of file
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](https://www.digikey.fi/en/products/detail/amphenol-cs-fci/71600-104LF/1523943) ribbon cable connector, for example.
## Symbols Test
The symbols test uses the [KiCad Library Utilities](https://gitlab.com/kicad/libraries/kicad-library-utils) 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.
\ No newline at end of file
#!/bin/bash
cd kicad-library-utils/klc-check
python3 check_symbol.py -vv ../../fab.kicad_sym
FPS=$(ls ../../fab.pretty/*.kicad_mod)
for FP in ${FPS}
do
python3 check_footprint.py ${FP}
done
#!/bin/bash
cd kicad-library-utils/klc-check
./check_symbol.py ../../fab.kicad_sym -p '^(?!.*PWR_FLAG).*$' -vv
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment