diff --git a/crates/openshell-cli/BUILD.bazel b/crates/openshell-cli/BUILD.bazel index 978202f0c1..1f5355a00d 100644 --- a/crates/openshell-cli/BUILD.bazel +++ b/crates/openshell-cli/BUILD.bazel @@ -2,6 +2,7 @@ load("@crates//:defs.bzl", "aliases", "all_crate_deps") load("@rules_rs//rs:rust_binary.bzl", "rust_binary") load("@rules_rs//rs:rust_library.bzl", "rust_library") load("@rules_rs//rs:rust_test.bzl", "rust_test") +load("@rules_rust//rust:defs.bzl", "rustfmt_test") load("@workspace_version//:version.bzl", "WORKSPACE_VERSION") rust_library( @@ -24,6 +25,11 @@ rust_binary( deps = all_crate_deps(normal = True) + [":openshell-cli"], ) +rustfmt_test( + name = "openshell_rustfmt_test", + targets = [":openshell"], +) + rust_binary( name = "fake-forward-process", testonly = True, @@ -31,6 +37,11 @@ rust_binary( crate_root = "tests/fixtures/fake_forward.rs", ) +rustfmt_test( + name = "fake-forward-process_rustfmt_test", + targets = [":fake-forward-process"], +) + rust_test( name = "openshell-cli_lib_test", crate = ":openshell-cli", diff --git a/crates/openshell-driver-kubernetes/BUILD.bazel b/crates/openshell-driver-kubernetes/BUILD.bazel index 4c79f78aa3..2a47fd45ba 100644 --- a/crates/openshell-driver-kubernetes/BUILD.bazel +++ b/crates/openshell-driver-kubernetes/BUILD.bazel @@ -2,6 +2,7 @@ load("@crates//:defs.bzl", "aliases", "all_crate_deps") load("@rules_rs//rs:rust_binary.bzl", "rust_binary") load("@rules_rs//rs:rust_library.bzl", "rust_library") load("@rules_rs//rs:rust_test.bzl", "rust_test") +load("@rules_rust//rust:defs.bzl", "rustfmt_test") rust_library( name = "openshell-driver-kubernetes", @@ -23,6 +24,11 @@ rust_binary( deps = all_crate_deps(normal = True) + [":openshell-driver-kubernetes"], ) +rustfmt_test( + name = "openshell-driver-kubernetes_bin_rustfmt_test", + targets = [":openshell-driver-kubernetes_bin"], +) + rust_test( name = "openshell-driver-kubernetes_test", crate = ":openshell-driver-kubernetes", diff --git a/crates/openshell-driver-podman/BUILD.bazel b/crates/openshell-driver-podman/BUILD.bazel index 4830658560..df64152ecd 100644 --- a/crates/openshell-driver-podman/BUILD.bazel +++ b/crates/openshell-driver-podman/BUILD.bazel @@ -2,6 +2,7 @@ load("@crates//:defs.bzl", "aliases", "all_crate_deps") load("@rules_rs//rs:rust_binary.bzl", "rust_binary") load("@rules_rs//rs:rust_library.bzl", "rust_library") load("@rules_rs//rs:rust_test.bzl", "rust_test") +load("@rules_rust//rust:defs.bzl", "rustfmt_test") rust_library( name = "openshell-driver-podman", @@ -23,6 +24,11 @@ rust_binary( deps = all_crate_deps(normal = True) + [":openshell-driver-podman"], ) +rustfmt_test( + name = "openshell-driver-podman_bin_rustfmt_test", + targets = [":openshell-driver-podman_bin"], +) + rust_test( name = "openshell-driver-podman_test", crate = ":openshell-driver-podman", diff --git a/crates/openshell-sandbox/BUILD.bazel b/crates/openshell-sandbox/BUILD.bazel index 347dd5d595..7b4036040f 100644 --- a/crates/openshell-sandbox/BUILD.bazel +++ b/crates/openshell-sandbox/BUILD.bazel @@ -2,6 +2,7 @@ load("@crates//:defs.bzl", "aliases", "all_crate_deps") load("@rules_rs//rs:rust_binary.bzl", "rust_binary") load("@rules_rs//rs:rust_library.bzl", "rust_library") load("@rules_rs//rs:rust_test.bzl", "rust_test") +load("@rules_rust//rust:defs.bzl", "rustfmt_test") load("@workspace_version//:version.bzl", "WORKSPACE_VERSION") rust_library( @@ -28,6 +29,11 @@ rust_binary( deps = all_crate_deps(normal = True) + [":openshell-sandbox"], ) +rustfmt_test( + name = "openshell-sandbox-bin_rustfmt_test", + targets = [":openshell-sandbox-bin"], +) + rust_test( name = "openshell-sandbox_lib_test", compile_data = ["//crates/openshell-supervisor-network:sandbox-policy-rego"], diff --git a/crates/openshell-server/BUILD.bazel b/crates/openshell-server/BUILD.bazel index bd7d72e7bc..465ee65ab4 100644 --- a/crates/openshell-server/BUILD.bazel +++ b/crates/openshell-server/BUILD.bazel @@ -2,6 +2,7 @@ load("@crates//:defs.bzl", "aliases", "all_crate_deps") load("@rules_rs//rs:rust_binary.bzl", "rust_binary") load("@rules_rs//rs:rust_library.bzl", "rust_library") load("@rules_rs//rs:rust_test.bzl", "rust_test") +load("@rules_rust//rust:defs.bzl", "rustfmt_test") rust_library( name = "openshell-server", @@ -27,6 +28,11 @@ rust_binary( deps = all_crate_deps(normal = True) + [":openshell-server"], ) +rustfmt_test( + name = "openshell-gateway_rustfmt_test", + targets = [":openshell-gateway"], +) + rust_test( name = "openshell-server_test", crate = ":openshell-server",