forked from Mirror/pmbootstrap
test: dont fail on githook symlinks
Since introducing git hooks, these tests fail locally because copytree can't handle the relative symlinks. Add a helper for this common pattern and set ignore_dangling_symlinks to safely skip these symlinks. Signed-off-by: Caleb Connolly <kc@postmarketos.org> Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230629-suffix-type-hint-v1-2-e92802ae20a8@postmarketos.org%3E
This commit is contained in:
parent
1a00c04f74
commit
d32be64820
5 changed files with 15 additions and 8 deletions
|
@ -9,6 +9,7 @@ import shutil
|
|||
import sys
|
||||
|
||||
import pmb_test # noqa
|
||||
import pmb_test.git
|
||||
import pmb.build
|
||||
import pmb.build._package
|
||||
import pmb.config
|
||||
|
@ -391,7 +392,7 @@ def test_build_local_source_high_level(args, tmpdir):
|
|||
|
||||
# aports: Add pmaports.cfg, .git
|
||||
shutil.copy(args.aports + "/pmaports.cfg", aports)
|
||||
shutil.copytree(args.aports + "/.git", aports + "/.git")
|
||||
pmb_test.git.copy_dotgit(args, tmpdir)
|
||||
|
||||
# src: Copy hello-world source files
|
||||
src = tmpdir + "/src"
|
||||
|
@ -450,7 +451,7 @@ def test_build_abuild_leftovers(args, tmpdir):
|
|||
|
||||
# aports: Add pmaports.cfg, .git
|
||||
shutil.copy(f"{args.aports}/pmaports.cfg", aports)
|
||||
shutil.copytree(f"{args.aports}/.git", f"{aports}/.git")
|
||||
pmb_test.git.copy_dotgit(args, aports)
|
||||
|
||||
# aport: create abuild dir with broken symlink
|
||||
src = f"{aport}/src"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue