unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 964adee9e600f16d743fa7e16afbcd1f64862eb5 748 bytes (raw)
name: gnu/packages/patches/containerd-test-with-go1.13.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 
Compatibility fix for go 1.13, flag.Parse() shouldn't be called during
package initialization.
https://golang.org/doc/go1.13#testing
--- a/client_test.go	2020-02-12 14:50:28.991245371 -0500
+++ b/client_test.go	2020-02-12 15:12:37.383523980 -0500
@@ -49,7 +49,6 @@
 	flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
 	flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
 	flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests")
-	flag.Parse()
 }
 
 func testContext() (context.Context, context.CancelFunc) {
@@ -59,6 +58,7 @@
 }
 
 func TestMain(m *testing.M) {
+	flag.Parse()
 	if testing.Short() {
 		os.Exit(m.Run())
 	}

debug log:

solving 964adee9e6 ...
found 964adee9e6 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).