Commit 170962be authored by Jeff Grafton's avatar Jeff Grafton

Explicitly log how long each step of e2e setup/test/teardown takes.

parent f03a2670
......@@ -31,6 +31,7 @@ import (
"path/filepath"
"strconv"
"strings"
"time"
)
var (
......@@ -84,6 +85,7 @@ type TestResult struct {
type ResultsByTest map[string]TestResult
func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
flag.Parse()
if *isup {
......@@ -297,6 +299,10 @@ func finishRunning(stepName string, cmd *exec.Cmd) bool {
cmd.Stderr = os.Stderr
}
log.Printf("Running: %v", stepName)
defer func(start time.Time) {
log.Printf("Step '%s' finished in %s", stepName, time.Since(start))
}(time.Now())
if err := cmd.Run(); err != nil {
log.Printf("Error running %v: %v", stepName, err)
return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment