gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/tools/embeddedbinary/test/BUILD (about)

     1  load("//tools:defs.bzl", "go_binary", "go_test")
     2  
     3  package(
     4      default_applicable_licenses = ["//:license"],
     5      licenses = ["notice"],
     6  )
     7  
     8  # helloworld_bundler is a Go program that imports helloworld/helloworld.go and
     9  # calls its functions. Therefore, it should print "Hello, gVisor!\n" to stdout,
    10  # as helloworld/helloworld_bundlee.go does.
    11  go_binary(
    12      name = "helloworld_bundler",
    13      srcs = ["helloworld_bundler.go"],
    14      deps = [
    15          "//tools/embeddedbinary/test/helloworld",
    16          "@org_golang_x_sys//unix:go_default_library",
    17      ],
    18  )
    19  
    20  # helloworld_test is a test that executes helloworld_bundler as a subprocess.
    21  # It verifies that its output is "Hello, gVisor!\n".
    22  go_test(
    23      name = "helloworld_test",
    24      srcs = ["helloworld_test.go"],
    25      data = [":helloworld_bundler"],
    26      deps = ["//pkg/test/testutil"],
    27  )