Added test for STEP file in makefile

This commit is contained in:
Salvador E. Tropea 2021-01-29 10:37:05 -03:00
parent d20d7e5d5c
commit c64fb3871c
2 changed files with 18 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']
MK_TARGETS = ['position', 'archive', 'interactive_bom', 'run_erc', '3D']
cov = coverage.Coverage()
@ -593,19 +593,29 @@ def test_makefile_1():
assert ctx.get_out_path(prj+'-erc.txt') in deps
check_test_v5_sch_deps(ctx, targets[targets['run_erc']].split(' '))
logging.debug('- Target `run_erc` OK')
# 3D target
deps = targets['3D'].split(' ')
assert len(deps) == 1, deps
assert ctx.get_out_path(os.path.join('3D', prj+'-3D.step')) in deps
deps = targets[targets['3D']].split(' ')
assert os.path.relpath(ctx.board_file) in deps
# We can't check the WRL because it isn't included in the docker image
logging.debug('- Target `3D` OK')
# archive target
deps = targets['archive'].split(' ')
assert len(deps) == 1, deps
assert ctx.get_out_path(prj+'-archive.zip') in deps
deps = targets[targets['archive']].split(' ')
assert len(deps) == 7, deps
assert len(deps) == 9, deps
assert 'position' in deps
assert 'interactive_bom' in deps
assert '3D' 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
assert ctx.get_out_path('positiondir') in deps
assert ctx.get_out_path('ibom') in deps
assert ctx.get_out_path('3D') in deps
logging.debug('- Target `archive` OK')
ctx.clean_up()

View File

@ -21,6 +21,11 @@ outputs:
type: ibom
dir: ibom
- name: '3D'
comment: 'STEP 3D model'
type: step
dir: 3D
- name: 'archive'
comment: 'Compressed files'
type: compress
@ -28,6 +33,7 @@ outputs:
files:
- from_output: 'position'
- from_output: 'interactive_bom'
- from_output: '3D'
- source: '*'
dest: AnotherCopy