Bumping k8s dependencies to 1.13

This commit is contained in:
Cheng Xing
2018-11-16 14:08:25 -08:00
parent 305407125c
commit b4c0b68ec7
8002 changed files with 884099 additions and 276228 deletions

View File

@@ -67,9 +67,9 @@ package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"go/build"
"io/ioutil"
"log"
"os"
@@ -144,6 +144,7 @@ func main() {
log.Fatalf("%s env GOROOT: %v", *flagGoCmd, err)
}
goroot = strings.TrimSpace(string(s))
os.Setenv("GOROOT", goroot) // for any subcommands
compiler = *flagCompiler
if compiler == "" {
@@ -250,11 +251,28 @@ func runBuild(name, dir string, count int) {
return
}
pkg, err := build.Import(dir, ".", 0)
// Make sure dependencies needed by go tool compile are installed to GOROOT/pkg.
out, err := exec.Command(*flagGoCmd, "build", "-i", dir).CombinedOutput()
if err != nil {
log.Print(err)
log.Printf("go build -i %s: %v\n%s", dir, err, out)
return
}
// Find dir and source file list.
var pkg struct {
Dir string
GoFiles []string
}
out, err = exec.Command(*flagGoCmd, "list", "-json", dir).Output()
if err != nil {
log.Printf("go list -json %s: %v\n", dir, err)
return
}
if err := json.Unmarshal(out, &pkg); err != nil {
log.Printf("go list -json %s: unmarshal: %v", dir, err)
return
}
args := []string{"-o", "_compilebench_.o"}
if is6g {
*flagMemprofilerate = -1