Lines Matching +full:go +full:- +full:version
1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
5 //go:build ignore
31 "google.golang.org/protobuf/internal/version"
50 golangLatest = golangVersions[len(golangVersions)-1]
60 // purgeTimeout determines the maximum age of unused sub-directories.
76 // Fail the test late, so we can test uncommitted changes with -failfast.
81 gitUntracked := mustRunCommand(t, "git", "ls-files", "--others", "--exclude-standard")
86 // Do the relatively fast checks up-front.
88 diff := mustRunCommand(t, "go", "run", "-tags", "protolegacy", "./internal/cmd/generate-types")
92 diff = mustRunCommand(t, "go", "run", "-tags", "protolegacy", "./internal/cmd/generate-protos")
98 files := strings.Split(strings.TrimSpace(mustRunCommand(t, "git", "ls-files", "*.go")), "\n")
99 diff := mustRunCommand(t, append([]string{"gofmt", "-d"}, files...)...)
105 …files := strings.Split(strings.TrimSpace(mustRunCommand(t, "git", "ls-files", "*.go", "*.proto")),…
113 goLabel := "Go" + goVersion
116 sema <- true
117 go func() {
119 defer func() { <-sema }()
128 runGo("Normal", command{Dir: workDir}, "go", "test", "-race", "./...")
129 runGo("PureGo", command{Dir: workDir}, "go", "test", "-race", "-tags", "purego", "./...")
130 runGo("Reflect", command{Dir: workDir}, "go", "test", "-race", "-tags", "protoreflect", "./...")
132 …runGo("ProtoLegacy", command{Dir: workDir}, "go", "test", "-race", "-tags", "protolegacy", "./...")
133 runGo("ProtocGenGo", command{Dir: "cmd/protoc-gen-go/testdata"}, "go", "test")
134 runGo("Conformance", command{Dir: "internal/conformance"}, "go", "test", "-execute")
136 // Only run the 32-bit compatibility tests for Linux;
139 …runGo("Arch32Bit", command{Dir: workDir, Env: append(os.Environ(), "GOARCH=386")}, "go", "test", "…
148 "-SA1019", // disable deprecated usage check
149 "-S*", // disable code simplification checks
150 "-ST*", // disable coding style checks
151 "-U*", // disable unused declaration checks
153 …out := mustRunCommand(t, "staticcheck", "-checks="+strings.Join(checks, ","), "-fail=none", "./...…
194 // Delete the current directory if non-empty,
200 os.RemoveAll(workingDir) // best-effort
212 // Delete other sub-directories that are no longer relevant.
219 os.Chtimes(dir, now, now) // best-effort
226 os.RemoveAll(dir) // best-effort
230 // The bin directory contains symlinks to each tool by version.
242 // We avoid downloading the pre-compiled binaries since they do not contain
244 protobufPath = startWork("protobuf-" + protobufVersion)
252 …tRun(t, "git", "clone", "https://github.com/protocolbuffers/protobuf", "protobuf-"+protobufVersion)
258 check(os.Setenv("PROTOBUF_ROOT", protobufPath)) // for generate-protos
259 …registerBinary("conform-test-runner", filepath.Join(protobufPath, "bazel-bin", "conformance", "con…
260 registerBinary("protoc", filepath.Join(protobufPath, "bazel-bin", "protoc"))
263 // Download each Go toolchain version.
265 goDir := startWork("go" + v)
268 url := fmt.Sprintf("https://dl.google.com/go/go%v.%v-%v.tar.gz", v, runtime.GOOS, runtime.GOARCH)
269 …downloadArchive(check, goDir, url, "go", "") // skip SHA256 check as we fetch over https from a tr…
271 registerBinary("go"+v, filepath.Join(goDir, "bin", "go"))
274 registerBinary("go", filepath.Join(testDir, "go"+golangLatest, "bin", "go"))
275 registerBinary("gofmt", filepath.Join(testDir, "go"+golangLatest, "bin", "gofmt"))
278 checkDir := startWork("staticcheck-" + staticcheckVersion)
281 …url := fmt.Sprintf("https://github.com/dominikh/go-tools/releases/download/%v/staticcheck_%v_%v.ta…
287 // GitHub actions sets GOROOT, which confuses invocations of the Go toolchain.
294 // Setup GOPATH for pre-module support (i.e., go1.10 and earlier).
296 …modulePath = strings.TrimSpace(command{Dir: testDir}.mustRun(t, "go", "list", "-m", "-f", "{{.Path…
300 command{Dir: repoRoot}.mustRun(t, "go", "mod", "tidy")
301 command{Dir: repoRoot}.mustRun(t, "go", "mod", "vendor")
375 …fmt.Print(mustRunCommand(t, "go", "run", "-tags", "protolegacy", "./internal/cmd/generate-types", …
376 …fmt.Print(mustRunCommand(t, "go", "run", "-tags", "protolegacy", "./internal/cmd/generate-protos",…
377 files := strings.Split(strings.TrimSpace(mustRunCommand(t, "git", "ls-files", "*.go")), "\n")
378 mustRunCommand(t, append([]string{"gofmt", "-w"}, files...)...)
383 v := version.String()
391 binPath := filepath.Join("bin", fmt.Sprintf("protoc-gen-go.%v.%v.%v", v, goos, goarch))
395 …cmd.mustRun(t, "go", "build", "-trimpath", "-ldflags", "-s -w -buildid=", "-o", binPath, "./cmd/pr…
404 comment := fmt.Sprintf("protoc-gen-go VERSION=%v GOOS=%v GOARCH=%v", v, goos, goarch)
410 fw, _ := zw.Create("protoc-gen-go.exe")
419 Name: "protoc-gen-go",
440 regexp.MustCompile(`^// Copyright \d\d\d\d The Go Authors\. All rights reserved.
441 // Use of this source code is governed by a BSD-style
444 // Generated .pb.go files from main protobuf repo.
445 regexp.MustCompile(`^// Protocol Buffers - Google's data interchange format