[Tests][Diff][Added] using stash strategy

And this test was originally designed for a stash case
This commit is contained in:
Salvador E. Tropea 2024-01-16 09:45:25 -03:00
parent 63bf0f4295
commit 18e4397a3d
2 changed files with 32 additions and 1 deletions

View File

@ -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'])

View File

@ -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'