IIRC these two error simply comes from omitted files in test
directories. I fixed it this way:
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,20 @@
#!/usr/bin/make -f
-export DH_GOLANG_INSTALL_EXTRA := _testdata
+# We want exclude the testdata directory from the go sources and
configure it
+# manually as it contains broken symlinks that are ignored by default by
+# dh_auto_configure.
+# We also want to remove it from the built package as it contains a binary
+# program built from the tests.
+export DH_GOLANG_EXCLUDES := testdata/
+export DH_GOLANG_EXCLUDES_ALL := 1
+
+BUILDDIR=debian/build
%:
- dh $@ --buildsystem=golang --with=golang
+ dh $@ --builddir=$(BUILDDIR) --buildsystem=golang
+
+execute_after_dh_auto_configure:
+# Manually copy the testdata directory in the builddir the following tests:
+# - TestFilterOutDirs
+# - TestReadDirRecursiveLoopDetection
+ cp -r testdata $(BUILDDIR)/src/github.com/arduino/go-paths-helper
I will push my work to the salsa repo so that you can continue based on
it if you'd like.
[1]
https://salsa.debian.org/go-team/packages/golang-github-arduino-go-paths-helper