summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2024-07-08 16:29:10 +0200
committerjaseg <git@jaseg.de>2024-07-08 16:29:10 +0200
commitf447b12571049da91e726d2bb20e30eff07bac46 (patch)
treea8fa3b4f04715a5e798cf7a82fcb939c323ac387
parent93fd764482835879f2b64b7f94a6e64815c051a1 (diff)
downloadgerbonara-f447b12571049da91e726d2bb20e30eff07bac46.tar.gz
gerbonara-f447b12571049da91e726d2bb20e30eff07bac46.tar.bz2
gerbonara-f447b12571049da91e726d2bb20e30eff07bac46.zip
tests: Fix compatibility with recent kicad nightly containers
-rw-r--r--gerbonara/tests/image_support.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerbonara/tests/image_support.py b/gerbonara/tests/image_support.py
index b1b0f59..c5ebee4 100644
--- a/gerbonara/tests/image_support.py
+++ b/gerbonara/tests/image_support.py
@@ -160,7 +160,10 @@ def kicad_fp_export(mod_file, out_svg):
os.chmod(tmpdir, 0o1777)
pretty_dir = mod_file.parent
fp_name = mod_file.name[:-len('.kicad_mod')]
- cmd = ['podman', 'run', '--mount', f'type=bind,src={pretty_dir},dst=/{pretty_dir.name}',
+ cmd = ['podman', 'run',
+ '--rm', # Clean up volumes after exit
+ '--userns=keep-id', # To allow container to read from bind mount
+ '--mount', f'type=bind,src={pretty_dir},dst=/{pretty_dir.name}',
'--mount', f'type=bind,src={tmpdir},dst=/out',
'registry.hub.docker.com/kicad/kicad:nightly',
'kicad-cli', 'fp', 'export', 'svg', '--output', '/out', '--footprint', fp_name, f'/{pretty_dir.name}']