From 2586e6aa8889e61678d9c424c97fff1d2242e0c0 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 25 Jan 2024 09:26:23 -0300 Subject: [PATCH] [Tests][Added] KiRi to the Quick Start test --- tests/test_plot/test_misc.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 8a949c48..5b5418b8 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -1368,25 +1368,33 @@ def test_quick_start_1(test_dir): sch_file = os.path.basename(ctx.sch_file) dest_file_sch = os.path.join(dest_dir, sch_file) 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) dest_conf = os.path.join(dir_o, generated) ctx.expect_out_file(dest_conf) # 2) Generate one output that we can use as image for a category logging.debug('Creating `basic_pcb_print_pdf`') 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')) # 3) List the generated outputs 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', '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') for o in OUTS: ctx.search_out(r'\['+o+r'\]') # 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(os.path.join('Browse', 'light_control-navigate.html'))