m/test/launch/cli: turn targets back into binaries and aliases
We had some kind of hack to get //metropolis:{launch,launch-cluster} to
work as `bazel test` targets, but I see no reason to ever want that.
Having the thing go through a test_suite and a native_test broke passing
SIGINT and caused the emulated environments to continue running in the
background forked off the server when the user exited via Ctrl-C.
For some reason, running in tests also allowed us to do a weird hack in
which we could resolve the TPM config directory as a runfile and list
files there (running via `bazel run` broke that). Let's also fix this to
just use a file list instead.
Change-Id: I3389617272307275e2755e540b233f88ca80f0bd
Reviewed-on: https://review.monogon.dev/c/monogon/+/3105
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/test/launch/cli/launch-cluster/BUILD.bazel b/metropolis/test/launch/cli/launch-cluster/BUILD.bazel
index 2c673c5..688228e 100644
--- a/metropolis/test/launch/cli/launch-cluster/BUILD.bazel
+++ b/metropolis/test/launch/cli/launch-cluster/BUILD.bazel
@@ -13,20 +13,10 @@
)
go_binary(
- name = "launch-cluster_bin",
+ name = "launch-cluster",
data = [
"//metropolis/cli/metroctl",
],
embed = [":launch-cluster_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-cluster",
- src = ":launch-cluster_bin",
- out = "launch",
- tags = ["manual"],
visibility = ["//visibility:public"],
)