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

     1  [short] skip
     2  [compiler:gccgo] skip # gccgo has no cover tool
     3  [!GOEXPERIMENT:coverageredesign] skip
     4  
     5  go test -short -cover -covermode=atomic -coverpkg=coverdep/p1 coverdep
     6  
     7  # In addition to the above, test to make sure there is no funny
     8  # business if we try "go test -cover" in atomic mode targeting
     9  # sync/atomic itself (see #57445). Just a short test run is needed
    10  # since we're mainly interested in making sure the test builds and can
    11  # execute at least one test.
    12  
    13  go test -short -covermode=atomic -run=TestStoreInt64 sync/atomic
    14  go test -short -covermode=atomic -run=TestAnd8 runtime/internal/atomic
    15  
    16  # Skip remainder if no race detector support.
    17  [!race] skip
    18  
    19  go test -short -cover -race -run=TestStoreInt64 sync/atomic
    20  go test -short -cover -race -run=TestAnd8 runtime/internal/atomic
    21  
    22  -- go.mod --
    23  module coverdep
    24  
    25  go 1.16
    26  -- p.go --
    27  package p
    28  
    29  import _ "coverdep/p1"
    30  
    31  func F() {
    32  }
    33  -- p1/p1.go --
    34  package p1
    35  
    36  import _ "errors"
    37  -- p_test.go --
    38  package p
    39  
    40  import "testing"
    41  
    42  func Test(t *testing.T) {
    43  	F()
    44  }
    45  

View as plain text