File: 0001-Allow-TestSimple-cover-to-PASS.patch

package info (click to toggle)
golang-github-rogpeppe-go-internal 1.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,184 kB
  • sloc: makefile: 6
file content (31 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download
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
26
27
28
29
30
31
Description: Allow TestSimple/cover to PASS during Debian/Ubuntu package build
 gotooltest/testdata/cover.txt runs "go mod tidy" which fails with
 "dial tcp: lookup proxy.golang.org: no such host".  See the build logs at
 https://launchpad.net/ubuntu/+source/golang-github-rogpeppe-go-internal/1.8.0-1
 for more information.
 .
 This is for patching in override_dh_auto_test in debian/rules only.
 Do not add to debian/patches/series.
Author: Anthony Fok <foka@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2021-12-02, 2023-06-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/_build/src/github.com/rogpeppe/go-internal/testscript/testscript.go
+++ b/_build/src/github.com/rogpeppe/go-internal/testscript/testscript.go
@@ -1098,6 +1098,14 @@
 	ts.clearBuiltinStd()
 
 	fmt.Fprintf(&ts.log, "FAIL: %s:%d: %s\n", ts.file, ts.lineno, fmt.Sprintf(format, args...))
+
+	// Allow TestSimple/cover to PASS during Debian/Ubuntu package build
+	t, ok := (ts.t).(tshim)
+	if ok && t.Name() == "TestSimple/cover" {
+		fmt.Fprintf(&ts.log, "SKIP: %s: Possible restricted network access\n", t.Name())
+		ts.t.Skip()
+	}
+
 	// This should be caught by the defer inside the TestScript.runLine method.
 	// We do this rather than calling ts.t.FailNow directly because we want to
 	// be able to continue on error when Params.ContinueOnError is set.