[pkg-go] autopkgtest

Martín Ferrari tincho at tincho.org
Fri May 20 12:46:19 UTC 2016


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.

-- 
Martín Ferrari (Tincho)



More information about the Pkg-go-maintainers mailing list