| load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") |
| load("@bazel_skylib//rules:native_binary.bzl", "native_test") |
| |
| go_library( |
| name = "launch_lib", |
| srcs = ["main.go"], |
| importpath = "source.monogon.dev/metropolis/test/launch/cli/launch", |
| visibility = ["//visibility:private"], |
| deps = [ |
| "//metropolis/proto/api", |
| "//metropolis/test/launch", |
| "//metropolis/test/launch/cluster", |
| ], |
| ) |
| |
| go_binary( |
| name = "launch_bin", |
| data = [ |
| "//metropolis/node:image", |
| "//metropolis/node:swtpm_data", |
| "//third_party/edk2:firmware", |
| ], |
| embed = [":launch_lib"], |
| visibility = ["//:__pkg__"], |
| ) |
| |
| # Wrap the binary in a native_test so that we can run it with the |
| # `bazel test` command inside the sandbox. |
| native_test( |
| name = "launch", |
| src = ":launch_bin", |
| out = "launch", |
| tags = ["manual"], |
| visibility = ["//visibility:public"], |
| ) |