On 21/05/2016 7:33 am, "Martín Ferrari" <tin...@tincho.org> wrote: > > On 20/05/16 05:24, Michael Hudson-Doyle wrote: > > Somehow I don't have Martín's original mail... > > Here it is: > https://www.mail-archive.com/pkg-go-maintainers@lists.alioth.debian.org/msg03657.html > > On 20/05/16 05:51, Michael Hudson-Doyle wrote: > > >> GOPATH=/usr/share/gocode go test -short $(perl > >> -MDebian::Debhelper::Dh_Buildsystems -e 'buildsystems_init(); my $bs = > >> load_buildsystem("golang"); print(join " ", $bs->get_targets(), > >> "\n");') > > > > Oh, this doesn't quite work does it, because you want the influence of > > the other variables that might be set in rules, like > > DH_GOLANG_BUILDPKG & DH_GOLANG_EXCLUDES. Maybe just re-running the > > package build in the autopkgest environment would be best, or at least > > ./debian/rules build. It wouldn't even be very inefficient, because > > the package has to be recompiled to be tested anyway. > > Actually, the idea is to test the *installed* package. So IMO the best > is to just get the import-path and run go test with the GOPATH set as > you suggest. > > I tried this locally and works perfectly.
It won't work for debian packages that have go packages that fail tests (or fail to build!) in DH_GOLANG_EXCLUDES. You could argue that such packages are broken, but there are definitely a few in the archive. Perhaps we should just patch those tests out (// +build ignore, I guess) instead... Cheers, mwh
_______________________________________________ Pkg-go-maintainers mailing list Pkg-go-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers