Beispiel #1
0
func new_build(build builder.Build, work *Work) (b *Build) {
	b = &Build{
		ID:       new_id(),
		Build:    build,
		WorkID:   work.ID,
		Revision: build.Revision(),
		Passed:   true,

		poke: make(chan *Test),
		done: work.poke,
	}
	return
}
Beispiel #2
0
func run_build_item(build builder.Build, w *Work) {
	b, paths := new_build(build, w), build.Paths()
	go b.cleanup(len(paths))

	if err := build.Error(); err != nil {
		b.Error = err.Error()
		b.Passed = false
		return
	}

	for _, path := range paths {
		t := new_test(path, b, w)
		schedule_test <- t
	}
}