#!/usr/bin/make -f # -*- makefile -*- # Excluded binaries. List all binary names: # go list -f '{{ if eq .Name "main" }}{{ .ImportPath }}{{ end }}' ./... # (cd gopls && go list -f '{{ if eq .Name "main" }}{{ .ImportPath }}{{ end }}' ./...) export DH_GOLANG_EXCLUDES := \ cmd/signature-fuzzer \ go/analysis/passes/httpmux/cmd/httpmux \ gopls\b \ # EOL # Excluded tests export DH_GOLANG_EXCLUDES += \ copyright \ # EOL # eg #753978 # stress #793693 # bundle #818551 RENAME_BIN := \ bisect \ bundle \ deadcode \ eg \ stress \ # EOL # All go/analysis/*/*/cmd/* RENAME_BIN += \ defers \ fieldalignment \ findcall \ ifaceassert \ lostcancel \ nilness \ shadow \ stringintconv \ unmarshal \ unusedresult \ # EOL # All go/*/internal/* RENAME_BIN += \ nodecount \ play \ # EOL execute_before_dh_auto_configure: # Copy golang.org/x/telemetry for opt-in transparent telemetry; # see https://go.dev/issue/58894 mkdir -p _build cp -av debian/go/src _build/ execute_after_dh_auto_install: for i in $(RENAME_BIN); \ do \ mv debian/tmp/usr/bin/$$i debian/tmp/usr/bin/golang-$$i; \ done # gopls can't be not imported by other packages. # remove it to avoid tests in autopkgtest which causes circular # dependencies when updating golang-golang-x-vuln. rm -rvf debian/tmp/usr/share/gocode/src/golang.org/x/tools/gopls SKIP="TestTestFiles|TestMultifileStringer|TestPassModule|TestAnalyzer|TestErrorsAsType|TestRangeInt|TestCHAGenerics|TestCHAUnexported|TestRTA|TestStatic|TestNodeInterface|TestVTAGraphConstruction|TestPropagation|TestVTACallGraph|TestVTACallGraphGenerics|TestVTACallGraphGo117|TestIssue70394|TestDirAndForTest|TestCompiledGoFilesIncludesDepsErrors|TestGenericBodies|TestTypesWithNames|TestNoIndirectCreatePackage|TestInit|TestSyntheticFuncs|TestPhiElimination|TestGenericDecls|TestGenericWrappers|TestOrderOfOperations|TestGenericFunctionSelector|TestSyntax|TestLabels|TestIssue67079|TestNeedsInstance|TestCallsToInstances|TestInstanceUniqueness|TestObjValueLookup|TestValueForExpr|TestValueForExprStructConv|TestEnclosingFunction|TestGenericPaths|TestEncodeDecodeAliases|TestIExportDataTypeParameterizedAliases|TestRmdirAfterGoList_Direct|TestData/generic.txtar|TestData/import-preserve-local-pkgname.txtar|TestData/assignment.txtar|TestData/import-comments2.txtar|TestData/import-shadow-1.txtar|TestData/import-shadow-2.txtar|TestFree124|TestZeroValue|TestOrigin/alias|TestOrigin/localalias|TestCalls|TestRewrites|TestPaths|TestOrdering|TestIssue70418" override_dh_auto_test: ifeq (,$(findstring gccgo, $(shell go version))) # use short tests where possible (especially to skip tests like # TestWebIndex which are very slow) -dh_auto_test -- -short -timeout=30m -run=$(SKIP) dh_auto_test -- -short -timeout=30m -skip=$(SKIP) endif %: dh $@ --builddirectory=_build