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

View as plain text