...

Text file src/cmd/go/testdata/script/cpu_profile_twice.txt

Documentation: cmd/go/testdata/script

     1env GO111MODULE=off
     2
     3# Issue 23150
     4
     5[short] skip
     6
     7go test -o=$WORK/x.test -cpuprofile=$WORK/cpu_profile_twice.out x
     8rm $WORK/cpu_profile_twice.out
     9
    10go test -o=$WORK/x.test -cpuprofile=$WORK/cpu_profile_twice.out x
    11exists $WORK/cpu_profile_twice.out
    12
    13
    14-- x/x_test.go --
    15package x_test
    16import (
    17    "testing"
    18    "time"
    19)
    20func TestSleep(t *testing.T) {
    21    time.Sleep(10 * time.Millisecond)
    22}

View as plain text