[Tests][Added] KiRi to the Quick Start test
This commit is contained in:
parent
63e7d2b733
commit
2586e6aa88
|
|
@ -1368,25 +1368,33 @@ def test_quick_start_1(test_dir):
|
||||||
sch_file = os.path.basename(ctx.sch_file)
|
sch_file = os.path.basename(ctx.sch_file)
|
||||||
dest_file_sch = os.path.join(dest_dir, sch_file)
|
dest_file_sch = os.path.join(dest_dir, sch_file)
|
||||||
shutil.copy2(ctx.sch_file, dest_file_sch)
|
shutil.copy2(ctx.sch_file, dest_file_sch)
|
||||||
|
# Create a git repo
|
||||||
|
git_init(ctx)
|
||||||
|
# Add the files to the repo
|
||||||
|
ctx.run_command(['git', 'add', board_file, sch_file], chdir_out=dest_dir)
|
||||||
|
ctx.run_command(['git', 'commit', '-m', 'Reference'], chdir_out=dest_dir)
|
||||||
|
# Modify the PCB
|
||||||
|
shutil.copy2(ctx.board_file.replace(prj, prj+'_diff'), dest_file)
|
||||||
|
# Run the Quick Start
|
||||||
ctx.run(extra=['--quick-start', '--dry', '--start', dest_dir], no_board_file=True, no_yaml_file=True)
|
ctx.run(extra=['--quick-start', '--dry', '--start', dest_dir], no_board_file=True, no_yaml_file=True)
|
||||||
dest_conf = os.path.join(dir_o, generated)
|
dest_conf = os.path.join(dir_o, generated)
|
||||||
ctx.expect_out_file(dest_conf)
|
ctx.expect_out_file(dest_conf)
|
||||||
# 2) Generate one output that we can use as image for a category
|
# 2) Generate one output that we can use as image for a category
|
||||||
logging.debug('Creating `basic_pcb_print_pdf`')
|
logging.debug('Creating `basic_pcb_print_pdf`')
|
||||||
dest_conf_f = os.path.join(dest_dir, 'kibot_generated.kibot.yaml')
|
dest_conf_f = os.path.join(dest_dir, 'kibot_generated.kibot.yaml')
|
||||||
ctx.run(extra=['-c', dest_conf_f, 'basic_pcb_print_pdf'], no_yaml_file=True)
|
ctx.run(extra=['-c', dest_conf_f, '-b', dest_file, 'basic_pcb_print_pdf'], no_yaml_file=True, no_board_file=True)
|
||||||
ctx.expect_out_file(os.path.join('PCB', 'PDF', prj+'-assembly.pdf'))
|
ctx.expect_out_file(os.path.join('PCB', 'PDF', prj+'-assembly.pdf'))
|
||||||
# 3) List the generated outputs
|
# 3) List the generated outputs
|
||||||
logging.debug('Creating the web pages')
|
logging.debug('Creating the web pages')
|
||||||
ctx.run(extra=['-c', dest_conf_f, '-l'], no_out_dir=True, no_yaml_file=True)
|
ctx.run(extra=['-c', dest_conf_f, '-b', dest_file, '-l'], no_out_dir=True, no_yaml_file=True, no_board_file=True)
|
||||||
OUTS = ('boardview', 'dxf', 'excellon', 'gencad', 'gerb_drill', 'gerber', 'compress', 'hpgl', 'ibom',
|
OUTS = ('boardview', 'dxf', 'excellon', 'gencad', 'gerb_drill', 'gerber', 'compress', 'hpgl', 'ibom',
|
||||||
'navigate_results', 'netlist', 'pcb_print', 'pcbdraw', 'pdf', 'position', 'ps', 'render_3d',
|
'navigate_results', 'netlist', 'pcb_print', 'pcbdraw', 'pdf', 'position', 'ps', 'render_3d',
|
||||||
'report', 'step', 'svg',
|
'report', 'step', 'svg', 'kiri',
|
||||||
'bom', 'download_datasheets', 'pdf_sch_print', 'svg_sch_print')
|
'bom', 'download_datasheets', 'pdf_sch_print', 'svg_sch_print')
|
||||||
for o in OUTS:
|
for o in OUTS:
|
||||||
ctx.search_out(r'\['+o+r'\]')
|
ctx.search_out(r'\['+o+r'\]')
|
||||||
# 3) Generate the navigate_results stuff
|
# 3) Generate the navigate_results stuff
|
||||||
ctx.run(extra=['-c', dest_conf_f, 'basic_navigate_results'], no_yaml_file=True)
|
ctx.run(extra=['-c', dest_conf_f, '-b', dest_file, 'basic_navigate_results'], no_yaml_file=True, no_board_file=True)
|
||||||
ctx.expect_out_file('index.html')
|
ctx.expect_out_file('index.html')
|
||||||
ctx.expect_out_file(os.path.join('Browse', 'light_control-navigate.html'))
|
ctx.expect_out_file(os.path.join('Browse', 'light_control-navigate.html'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue