Skip to content

Commit

Permalink
Run containers integration test with bazel.
Browse files Browse the repository at this point in the history
There's one precondition: stage1 must be built with cargo. So this test
is still manual for now, but as soon as stage1 is ready we can remove
that tag and requirement.

Change-Id: Ia8c69fcd7faff9027d3259dc91c7cde45076cdb6
  • Loading branch information
jblebrun committed Oct 30, 2024
1 parent aeefd39 commit 3fed9ee
Show file tree
Hide file tree
Showing 24 changed files with 168 additions and 282 deletions.
8 changes: 8 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,11 @@ filegroup(
visibility =
["//:internal"],
)

# This gives us access to the cargo `target` dir for targets that are still not
# bazelified, so we can pull stage1.cpio out of it, or provide a useful error
# message if it's not there. See usage sites for relevant bugs.
filegroup(
name = "cargo-generated",
srcs = glob(["target/**"]),
)
158 changes: 13 additions & 145 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ members = [
"oak_client",
"oak_client/tonic",
"oak_containers/agent",
"oak_containers/examples/hello_world/untrusted_app",
"oak_containers/examples/hello_world/web_client",
"oak_containers/channel",
"oak_containers/launcher",
Expand Down
2 changes: 1 addition & 1 deletion buildconfigs/stage0_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export BUILD_COMMAND=(

# The first element must be the Transparent Release binary (the main binary).
export SUBJECT_PATHS=(
generated/stage0_bin
artifacts/stage0_bin
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_01_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_02_vcpu
stage0_bin/bin/subjects/sha2_384_measurement_of_initial_memory_with_stage0_and_04_vcpu
Expand Down
2 changes: 1 addition & 1 deletion buildconfigs/stage0_bin_tdx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export BUILD_COMMAND=(
)

export SUBJECT_PATHS=(
generated/stage0_bin_tdx
artifacts/stage0_bin_tdx
)
5 changes: 2 additions & 3 deletions cc/containers/hello_world_trusted_app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ pkg_tar(
name = "tar",
srcs = [":main"],
package_dir = "/usr/local/bin",
visibility = [
"//oak_containers/exmamples/hello_world/untrusted_app:__pkg__",
],
visibility = ["//visibility:public"],
)

oci_image(
Expand All @@ -75,4 +73,5 @@ oci_image(
oci_runtime_bundle(
name = "bundle",
image = ":image",
visibility = ["//visibility:public"],
)
Loading

0 comments on commit 3fed9ee

Please sign in to comment.