Skip to content

Commit

Permalink
syz-ci: make goroot optional
Browse files Browse the repository at this point in the history
If not set, syz-ci will use the system go.

Update google#712
  • Loading branch information
dvyukov committed Sep 17, 2018
1 parent 7819680 commit 3805b76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions syz-ci/syzupdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ func NewSyzUpdater(cfg *Config) *SyzUpdater {
}

gopath := filepath.Join(wd, "gopath")
os.Setenv("GOROOT", cfg.Goroot)
os.Unsetenv("GOPATH")
os.Setenv("PATH", filepath.Join(cfg.Goroot, "bin")+
string(filepath.ListSeparator)+os.Getenv("PATH"))
if cfg.Goroot != "" {
os.Setenv("GOROOT", cfg.Goroot)
os.Setenv("PATH", filepath.Join(cfg.Goroot, "bin")+
string(filepath.ListSeparator)+os.Getenv("PATH"))
}
syzkallerDir := filepath.Join(gopath, "src", "github.com", "google", "syzkaller")
osutil.MkdirAll(syzkallerDir)

Expand Down

0 comments on commit 3805b76

Please sign in to comment.