Added drill case to makefile test.

This commit is contained in:
Salvador E. Tropea 2021-01-29 11:54:09 -03:00
parent adc181f1b2
commit e6163ae5aa
2 changed files with 23 additions and 2 deletions

View File

@ -52,7 +52,7 @@ from kibot.gs import GS
POS_DIR = 'positiondir'
MK_TARGETS = ['position', 'archive', 'interactive_bom', 'run_erc', '3D', 'kibom_internal']
MK_TARGETS = ['position', 'archive', 'interactive_bom', 'run_erc', '3D', 'kibom_internal', 'drill']
cov = coverage.Coverage()
@ -590,6 +590,14 @@ def test_makefile_1():
assert ctx.get_out_path(os.path.join('ibom', prj+'-ibom.html')) in deps
assert os.path.abspath(targets[targets['interactive_bom']]) == ctx.board_file
logging.debug('- Target `interactive_bom` OK')
# drill target
deps = targets['drill'].split(' ')
assert len(deps) == 3, deps
assert ctx.get_out_path(os.path.join('gerbers', prj+'-drill.drl')) in deps
assert ctx.get_out_path(os.path.join('gerbers', prj+'-drill_report.txt')) in deps
assert ctx.get_out_path(os.path.join('gerbers', prj+'-drill_map.pdf')) in deps
assert os.path.abspath(targets[targets['drill']]) == ctx.board_file
logging.debug('- Target `drill` OK')
# run_erc target
deps = targets['run_erc'].split(' ')
assert len(deps) == 1, deps
@ -615,10 +623,11 @@ def test_makefile_1():
assert len(deps) == 1, deps
assert ctx.get_out_path(prj+'-archive.zip') in deps
deps = targets[targets['archive']].split(' ')
assert len(deps) == 10, deps
assert len(deps) == 12, deps
assert 'position' in deps
assert 'interactive_bom' in deps
assert '3D' in deps
assert 'drill' in deps
assert ctx.get_out_path('error.txt') in deps
assert ctx.get_out_path('output.txt') in deps
assert ctx.get_out_path('Makefile') in deps
@ -626,6 +635,7 @@ def test_makefile_1():
assert ctx.get_out_path('positiondir') in deps
assert ctx.get_out_path('ibom') in deps
assert ctx.get_out_path('3D') in deps
assert ctx.get_out_path('gerbers') in deps
logging.debug('- Target `archive` OK')
ctx.search_err(r'\(kibom_external\) \[kibom\] uses a name generated by the external tool')
ctx.clean_up()

View File

@ -43,6 +43,16 @@ outputs:
# Keep the KiBoM name
output: ''
- name: 'drill'
comment: 'Drilling data'
type: excellon
dir: gerbers
options:
report:
filename: '%f-%i.%x'
map:
type: pdf
- name: 'archive'
comment: 'Compressed files'
type: compress
@ -51,6 +61,7 @@ outputs:
- from_output: 'position'
- from_output: 'interactive_bom'
- from_output: '3D'
- from_output: 'drill'
- source: '*'
dest: AnotherCopy