Added simple test for pdf_pcb_print
This commit is contained in:
parent
da94eb3f57
commit
bb8d8a079a
|
|
@ -0,0 +1,34 @@
|
|||
"""
|
||||
Tests of Printing PCB files
|
||||
|
||||
We test:
|
||||
- PDF for bom.kicad_pcb
|
||||
|
||||
For debug information use:
|
||||
pytest-3 --log-cli-level debug
|
||||
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
# Look for the 'utils' module from where the script is running
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, os.path.dirname(script_dir))
|
||||
# Utils import
|
||||
from utils import context
|
||||
|
||||
PDF_DIR = 'Layers'
|
||||
PDF_FILE = 'PCB_Top.pdf'
|
||||
|
||||
|
||||
def test_print_sch():
|
||||
prj = 'bom'
|
||||
ctx = context.TestContext('PrPCB', prj, 'print_pcb', PDF_DIR)
|
||||
ctx.run()
|
||||
# Check all outputs are there
|
||||
ctx.expect_out_file(os.path.join(PDF_DIR, PDF_FILE))
|
||||
# We don't have a project, and we don't want one
|
||||
os.remove(os.path.join(ctx.get_board_dir(), prj+'.pro'))
|
||||
# We don't have a footprint cache, and we don't want one
|
||||
os.remove(os.path.join(ctx.get_board_dir(), 'fp-info-cache'))
|
||||
ctx.clean_up()
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Example KiPlot config file
|
||||
kiplot:
|
||||
version: 1
|
||||
|
||||
outputs:
|
||||
- name: 'print_front'
|
||||
comment: "Print F.Cu+F.SilkS"
|
||||
type: pdf_pcb_print
|
||||
dir: Layers
|
||||
options:
|
||||
output_name: PCB_Top.pdf
|
||||
layers:
|
||||
- layer: F.Cu
|
||||
- layer: F.SilkS
|
||||
|
||||
Loading…
Reference in New Issue