1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/usr/bin/make -f
# cloudwatch requires feyeleanor/sets
# dynamodb requires cbroglie/mapstructure and bitly/go-simplejson
export DH_GOLANG_EXCLUDES := \
cloudwatch \
dynamodb
export DH_GOLANG_INSTALL_ALL := 1 # need testdata
override_dh_auto_test:
# "Note: running all tests with the command `go test ./...` will currently fail as tests do not tear down their HTTP listeners."
set -e; \
for pkg in $$( \
cd obj-$(DEB_BUILD_GNU_TYPE)/src; \
find github.com/AdRoll/goamz -name '*_test.go' \
| xargs dirname \
| sort -u \
); do \
for excl in $(DH_GOLANG_EXCLUDES); do if [ "$$pkg" != "$${pkg%*$$excl*}" ]; then continue 2; fi; done; \
DH_GOLANG_BUILDPKG="$$pkg" dh_auto_test; \
done
%:
dh $@ --buildsystem=golang --with=golang
|