treewide: clean up test static binary targets
This removes some intermediate targets only used for transitions by
consolidating them into a single one.
Change-Id: I46dcbcb731038edd2b67259de1811018f5ba43da
Reviewed-on: https://review.monogon.dev/c/monogon/+/3753
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
diff --git a/cloud/agent/takeover/e2e/BUILD.bazel b/cloud/agent/takeover/e2e/BUILD.bazel
index 7259fc5..3ca92ee 100644
--- a/cloud/agent/takeover/e2e/BUILD.bazel
+++ b/cloud/agent/takeover/e2e/BUILD.bazel
@@ -4,6 +4,7 @@
name = "e2e_test",
srcs = ["main_test.go"],
data = [
+ # We use the layer instead of the binary to not add a transition target
"//cloud/agent/takeover",
"//third_party/edk2:OVMF_CODE.fd",
"//third_party/edk2:OVMF_VARS.fd",
@@ -13,7 +14,8 @@
"xCloudImagePath": "$(rlocationpath @debian_11_cloudimage//file )",
"xOvmfVarsPath": "$(rlocationpath //third_party/edk2:OVMF_VARS.fd )",
"xOvmfCodePath": "$(rlocationpath //third_party/edk2:OVMF_CODE.fd )",
- "xTakeoverPath": "$(rlocationpath //cloud/agent/takeover )",
+ # TODO(tim): Hardcoded because of https://github.com/monogon-dev/monogon/issues/316
+ "xTakeoverPath": "_main/cloud/agent/takeover/takeover_bin_/takeover_bin",
},
deps = [
"//cloud/agent/api",
diff --git a/cloud/agent/takeover/e2e/main_test.go b/cloud/agent/takeover/e2e/main_test.go
index 0521cc9..b141e63 100644
--- a/cloud/agent/takeover/e2e/main_test.go
+++ b/cloud/agent/takeover/e2e/main_test.go
@@ -174,6 +174,7 @@
t.Fatal(err)
}
defer takeoverSrcFile.Close()
+
if _, err := io.Copy(takeoverFile, takeoverSrcFile); err != nil {
t.Fatal(err)
}