1
0
mirror of https://github.com/golang/go synced 2024-11-24 11:00:08 -07:00

build: add gobuilder and goplay to run.bash

gobuilder: fix build to work with new log package

R=rsc
CC=golang-dev
https://golang.org/cl/2592041
This commit is contained in:
Andrew Gerrand 2010-10-21 10:46:10 +11:00
parent 1c9dfb7647
commit 06492d47cb
2 changed files with 17 additions and 9 deletions

View File

@ -86,7 +86,7 @@ func main() {
} }
for _, b := range builders { for _, b := range builders {
if err := b.buildCommit(c); err != nil { if err := b.buildCommit(c); err != nil {
log.Stderr(err) log.Println(err)
} }
runQueuedBenchmark() runQueuedBenchmark()
} }
@ -96,7 +96,7 @@ func main() {
for { for {
err := run(nil, goroot, "hg", "pull", "-u") err := run(nil, goroot, "hg", "pull", "-u")
if err != nil { if err != nil {
log.Stderr("hg pull failed:", err) log.Println("hg pull failed:", err)
time.Sleep(waitInterval) time.Sleep(waitInterval)
continue continue
} }
@ -129,7 +129,7 @@ func runQueuedBenchmark() bool {
func runBenchmark(r BenchRequest) { func runBenchmark(r BenchRequest) {
// run benchmarks and send to dashboard // run benchmarks and send to dashboard
log.Stderrf("%s benchmarking %d", r.builder.name, r.commit.num) log.Println(r.builder.name, "benchmarking", r.commit.num)
defer os.RemoveAll(r.path) defer os.RemoveAll(r.path)
pkg := path.Join(r.path, "go", "src", "pkg") pkg := path.Join(r.path, "go", "src", "pkg")
bin := path.Join(r.path, "go", "bin") bin := path.Join(r.path, "go", "bin")
@ -140,11 +140,11 @@ func runBenchmark(r BenchRequest) {
} }
benchLog, _, err := runLog(env, pkg, "gomake", "bench") benchLog, _, err := runLog(env, pkg, "gomake", "bench")
if err != nil { if err != nil {
log.Stderr("%s gomake bench:", r.builder.name, err) log.Println(r.builder.name, "gomake bench:", err)
return return
} }
if err = r.builder.recordBenchmarks(benchLog, r.commit); err != nil { if err = r.builder.recordBenchmarks(benchLog, r.commit); err != nil {
log.Stderr("recordBenchmarks:", err) log.Println("recordBenchmarks:", err)
} }
} }
@ -184,21 +184,21 @@ func (b *Builder) build() bool {
defer func() { defer func() {
err := recover() err := recover()
if err != nil { if err != nil {
log.Stderr("%s build: %s", b.name, err) log.Println(b.name, "build:", err)
} }
}() }()
c, err := b.nextCommit() c, err := b.nextCommit()
if err != nil { if err != nil {
log.Stderr(err) log.Println(err)
return false return false
} }
if c == nil { if c == nil {
return false return false
} }
log.Stderrf("%s building %d", b.name, c.num) log.Println(b.name, "building", c.num)
err = b.buildCommit(*c) err = b.buildCommit(*c)
if err != nil { if err != nil {
log.Stderr(err) log.Println(err)
} }
return true return true
} }

View File

@ -95,6 +95,14 @@ if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
fi fi
) || exit $? ) || exit $?
for i in ../misc/dashboard/builder ../misc/goplay
do
(xcd $i
gomake clean
gomake
) || exit $?
done
[ "$GOARCH" == arm ] || [ "$GOARCH" == arm ] ||
(xcd ../test/bench (xcd ../test/bench
if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then