From e6163ae5aa66c030ff468769546cd5a66266e72b Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 29 Jan 2021 11:54:09 -0300 Subject: [PATCH] Added drill case to makefile test. --- tests/test_plot/test_misc.py | 14 ++++++++++++-- tests/yaml_samples/makefile_1.kibot.yaml | 11 +++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 0fabc9c8..feada409 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -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() diff --git a/tests/yaml_samples/makefile_1.kibot.yaml b/tests/yaml_samples/makefile_1.kibot.yaml index 27351cfe..95107afa 100644 --- a/tests/yaml_samples/makefile_1.kibot.yaml +++ b/tests/yaml_samples/makefile_1.kibot.yaml @@ -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