diff --git a/.github/workflows/build-go.yaml b/.github/workflows/build-go.yaml index 1973919..1596e25 100644 --- a/.github/workflows/build-go.yaml +++ b/.github/workflows/build-go.yaml @@ -37,14 +37,14 @@ jobs: go install github.com/AlekSi/gocov-xml@latest - name: setup-for-older-go - if: ${{ matrix.go <= 1.17 }} + if: ${{ matrix.go <= 1.18 }} run: | # stay on an older version of golangci-lint which still builds against 1.17 # This is due to the introduction of generics. go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3 - name: setup-for-newer-go - if: ${{ matrix.go > 1.17 }} + if: ${{ matrix.go > 1.18 }} run: | go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest diff --git a/printer.go b/printer.go index f02979d..1929a0d 100644 --- a/printer.go +++ b/printer.go @@ -23,8 +23,9 @@ func printSetupError(id, suite, name string, recovery interface{}, err error) { fmt.Printf("%s\n", goterm.Bold( goterm.Color( - fmt.Sprintf("%s FAIL %s", + fmt.Sprintf("%s: %s FAIL %s", id, + suite, name, ), goterm.YELLOW, diff --git a/runner.go b/runner.go index 12d27da..aead64d 100644 --- a/runner.go +++ b/runner.go @@ -85,6 +85,7 @@ func (r *testRunner) executeIteration(ctx context.Context, currTest testRun, res var data interface{} var td TearDownFunction var err error + var start time.Time buf := &bytes.Buffer{} @@ -102,6 +103,7 @@ func (r *testRunner) executeIteration(ctx context.Context, currTest testRun, res // recover remote code. r := recover() + ti.duration = time.Since(start) if r == nil { return } @@ -144,9 +146,8 @@ func (r *testRunner) executeIteration(ctx context.Context, currTest testRun, res }() } - start := time.Now() + start = time.Now() ti.err = t.test.Function(ctx, subTestInfo) - ti.duration = time.Since(start) }(currTest, i) }