From 18e4397a3db597291e3aa8e5ac20084405cec3d4 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 16 Jan 2024 09:45:25 -0300 Subject: [PATCH] [Tests][Diff][Added] using stash strategy And this test was originally designed for a stash case --- tests/test_plot/test_misc.py | 4 +++- tests/yaml_samples/diff_git_3.kibot.yaml | 29 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/yaml_samples/diff_git_3.kibot.yaml diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 9f66727a..2296c9e3 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -1494,7 +1494,7 @@ def test_diff_git_2(test_dir): def test_diff_git_3(test_dir): """ Difference between the two repo points, no changes to stash """ prj = 'light_control' - yaml = 'diff_git_2' + yaml = 'diff_git_3' ctx = context.TestContext(test_dir, prj, yaml) # Create a git repo git_init(ctx) @@ -1826,6 +1826,7 @@ def test_definitions_1(test_dir): @pytest.mark.slow @pytest.mark.skipif(not context.ki7(), reason="Just testing with 7") def test_populate_1(test_dir): + """ Using PcbDraw as renderer """ prj = 'simple_2layer' # Fake ctx = context.TestContext(test_dir, prj, 'populate', 'Populate') ctx.run(no_board_file=True, extra=['-b', 'tests/data/ArduinoLearningKitStarter.kicad_pcb', 'Populate']) @@ -1836,6 +1837,7 @@ def test_populate_1(test_dir): @pytest.mark.slow @pytest.mark.skipif(not context.ki7(), reason="Just testing with 7") def test_populate_2(test_dir): + """ Using Blender as renderer """ prj = 'simple_2layer' # Fake ctx = context.TestContext(test_dir, prj, 'populate_blender', 'PopulateSimple') ctx.run(no_board_file=True, extra=['-b', 'tests/data/ArduinoLearningKitStarter.kicad_pcb']) diff --git a/tests/yaml_samples/diff_git_3.kibot.yaml b/tests/yaml_samples/diff_git_3.kibot.yaml new file mode 100644 index 00000000..73b4444d --- /dev/null +++ b/tests/yaml_samples/diff_git_3.kibot.yaml @@ -0,0 +1,29 @@ +kibot: + version: 1 + +globals: + git_diff_strategy: stash + +outputs: + - name: 'diff_pcb' + comment: "PCB difference with git HEAD" + type: diff + layers: ['F.Cu', 'In1.Cu'] + options: + old: KIBOT_LAST-1 + old_type: git + new: HEAD + new_type: git + cache_dir: .cache + force_checkout: true + add_link_id: true + + - name: result + comment: Test zip link + type: compress + options: + format: TAR + compression: lzma + follow_links: false + files: + - source: '*.pdf'