github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/please_go_test/gotest/BUILD (about)

     1  go_library(
     2      name = 'gotest',
     3      srcs = [
     4          'find_cover_vars.go',
     5          'write_test_main.go',
     6      ],
     7      deps = [
     8          '//src/fs',
     9          '//third_party/go:logging',
    10      ],
    11      visibility = ['//tools/please_go_test:all'],
    12  )
    13  
    14  go_test(
    15      name = 'find_cover_vars_test',
    16      srcs = ['find_cover_vars_test.go'],
    17      data = [
    18          'test_data/binary/core.a',
    19          'test_data/binary/lock.go',
    20          'test_data/core.a',
    21          'test_data/lock.go',
    22          ':test_excluded_archive',
    23      ],
    24      deps = [
    25          ':gotest',
    26          '//third_party/go:testify',
    27      ],
    28  )
    29  
    30  # Little tweak so we don't have to commit this file twice.
    31  genrule(
    32      name = 'test_excluded_archive',
    33      srcs = ['test_data/core.a'],
    34      outs = ['test_data/x/core.a'],
    35      cmd = 'cp $SRC $OUT',
    36  )
    37  
    38  go_test(
    39      name = 'write_test_main_test',
    40      srcs = ['write_test_main_test.go'],
    41      data = glob(['test_data/*.go']),
    42      deps = [
    43          ':gotest',
    44          '//third_party/go:testify',
    45      ],
    46  )