Debugging
This commit is contained in:
parent
6fc471456d
commit
50058126cb
1 changed files with 10 additions and 2 deletions
|
@ -217,6 +217,14 @@ func runTests(testDir, privateRepo, problem string) error {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
goCache, err := ioutil.TempDir("/tmp", "gocache")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := os.Chmod(goCache, 0777); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
runGo := func(arg ...string) error {
|
runGo := func(arg ...string) error {
|
||||||
log.Printf("> go %s", strings.Join(arg, " "))
|
log.Printf("> go %s", strings.Join(arg, " "))
|
||||||
|
|
||||||
|
@ -286,7 +294,7 @@ func runTests(testDir, privateRepo, problem string) error {
|
||||||
testtool.BinariesEnv + "=" + string(binariesJSON),
|
testtool.BinariesEnv + "=" + string(binariesJSON),
|
||||||
"PATH=" + os.Getenv("PATH"),
|
"PATH=" + os.Getenv("PATH"),
|
||||||
"HOME=" + os.Getenv("HOME"),
|
"HOME=" + os.Getenv("HOME"),
|
||||||
"GOCACHE=" + filepath.Join(binCache, ".cache"),
|
"GOCACHE=" + goCache,
|
||||||
}
|
}
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
@ -311,7 +319,7 @@ func runTests(testDir, privateRepo, problem string) error {
|
||||||
testtool.BinariesEnv + "=" + string(binariesJSON),
|
testtool.BinariesEnv + "=" + string(binariesJSON),
|
||||||
"PATH=" + os.Getenv("PATH"),
|
"PATH=" + os.Getenv("PATH"),
|
||||||
"HOME=" + os.Getenv("HOME"),
|
"HOME=" + os.Getenv("HOME"),
|
||||||
"GOCACHE=" + filepath.Join(binCache, ".cache"),
|
"GOCACHE=" + goCache,
|
||||||
}
|
}
|
||||||
benchCmd.Stdout = &buf
|
benchCmd.Stdout = &buf
|
||||||
benchCmd.Stderr = os.Stderr
|
benchCmd.Stderr = os.Stderr
|
||||||
|
|
Loading…
Reference in a new issue