[Tests][Added] --defs-from-env

This commit is contained in:
Salvador E. Tropea 2024-01-09 08:54:31 -03:00
parent 415e97e84b
commit 9c574efd14
1 changed files with 4 additions and 2 deletions

View File

@ -1548,11 +1548,13 @@ def test_diff_git_5(test_dir):
@pytest.mark.slow @pytest.mark.slow
@pytest.mark.eeschema @pytest.mark.eeschema
def test_diff_file_sch_1(test_dir): def test_diff_file_sch_1(test_dir):
""" Difference between the current Schematic and a reference file """ """ Difference between the current Schematic and a reference file
Also test definitions (from CLI and env) """
prj = 'light_control_diff' prj = 'light_control_diff'
yaml = 'diff_file_sch' yaml = 'diff_file_sch'
ctx = context.TestContext(test_dir, prj, yaml) ctx = context.TestContext(test_dir, prj, yaml)
ctx.run(extra=['-E', 'KiVer='+str(context.kicad_major), '-E', 'SCHExt='+context.KICAD_SCH_EXT]) os.environ['SCHExt'] = context.KICAD_SCH_EXT
ctx.run(extra=['-E', 'KiVer='+str(context.kicad_major), '--defs-from-env'])
ctx.expect_out_file(prj+'-diff_sch_FILE-Current.pdf') ctx.expect_out_file(prj+'-diff_sch_FILE-Current.pdf')
if is_debian: if is_debian:
ctx.compare_pdf(prj+'-diff_sch.pdf') ctx.compare_pdf(prj+'-diff_sch.pdf')