summaryrefslogtreecommitdiffstats
path: root/src/cmd/go/testdata/script/test_benchmark_labels.txt
blob: 6b424c1bd89392c363d1468eda2aa0590baae79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Tests that go test -bench prints out goos, goarch, and pkg.

# Check for goos, goarch, and pkg.
go test -run ^$ -bench . bench
stdout '^goos: '$GOOS
stdout '^goarch: '$GOARCH
stdout '^pkg: bench'

# Check go test does not print pkg multiple times
! stdout 'pkg:.*pkg: '
! stderr 'pkg:.*pkg:'

-- go.mod --
module bench

go 1.16
-- x_test.go --
package bench

import "testing"

func Benchmark(b *testing.B) {
}