| # Licensed under the Apache-2.0 license | |
| # SPDX-License-Identifier: Apache-2.0 | |
| load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test") | |
| package(default_visibility = ["//visibility:public"]) | |
| rust_library( | |
| name = "pldm_service", | |
| srcs = glob(["src/**/*.rs"]), | |
| crate_name = "openprot_pldm_service", | |
| edition = "2024", | |
| deps = [ | |
| "//services/mctp/api:mctp_api", | |
| "@rust_crates//:mctp", | |
| "@rust_crates//:mctp-lib", | |
| "@rust_crates//:pldm-common", | |
| "@rust_crates//:pldm-interface", | |
| ], | |
| ) | |
| rust_test( | |
| name = "pldm_service_test", | |
| crate = ":pldm_service", | |
| ) | |
| rust_test( | |
| name = "base_host_test", | |
| srcs = [ | |
| "tests/base_host.rs", | |
| "tests/common.rs", | |
| ], | |
| crate_root = "tests/base_host.rs", | |
| edition = "2024", | |
| deps = [ | |
| ":pldm_service", | |
| "//services/mctp/api:mctp_api", | |
| "//services/mctp/server:mctp_server_lib", | |
| "@rust_crates//:mctp", | |
| "@rust_crates//:mctp-lib", | |
| "@rust_crates//:pldm-common", | |
| "@rust_crates//:pldm-interface", | |
| ], | |
| ) | |
| rust_test( | |
| name = "firmware_update_host_test", | |
| srcs = [ | |
| "tests/common.rs", | |
| "tests/firmware_update_host.rs", | |
| ], | |
| crate_root = "tests/firmware_update_host.rs", | |
| edition = "2024", | |
| deps = [ | |
| ":pldm_service", | |
| "//services/mctp/api:mctp_api", | |
| "//services/mctp/server:mctp_server_lib", | |
| "//services/orchestrator/adapters/pldm:orchestrator_pldm_adapter", | |
| "//services/orchestrator/sm:orchestrator_sm", | |
| "@rust_crates//:mctp", | |
| "@rust_crates//:mctp-lib", | |
| "@rust_crates//:pldm-common", | |
| "@rust_crates//:pldm-interface", | |
| ], | |
| ) | |
| rust_test( | |
| name = "inventory_host_test", | |
| srcs = [ | |
| "tests/common.rs", | |
| "tests/inventory_host.rs", | |
| ], | |
| crate_root = "tests/inventory_host.rs", | |
| edition = "2024", | |
| deps = [ | |
| ":pldm_service", | |
| "//services/mctp/api:mctp_api", | |
| "//services/mctp/server:mctp_server_lib", | |
| "@rust_crates//:mctp", | |
| "@rust_crates//:mctp-lib", | |
| "@rust_crates//:pldm-common", | |
| "@rust_crates//:pldm-interface", | |
| ], | |
| ) | |
| rust_test( | |
| name = "unexpected_eid_host_test", | |
| srcs = [ | |
| "tests/common.rs", | |
| "tests/unexpected_eid_host.rs", | |
| ], | |
| crate_root = "tests/unexpected_eid_host.rs", | |
| edition = "2024", | |
| deps = [ | |
| ":pldm_service", | |
| "//services/mctp/api:mctp_api", | |
| "//services/mctp/server:mctp_server_lib", | |
| "@rust_crates//:mctp", | |
| "@rust_crates//:mctp-lib", | |
| "@rust_crates//:pldm-common", | |
| "@rust_crates//:pldm-interface", | |
| ], | |
| ) | |
| rust_test( | |
| name = "unexpected_eid_fw_host_test", | |
| srcs = [ | |
| "tests/common.rs", | |
| "tests/unexpected_eid_fw_host.rs", | |
| ], | |
| crate_root = "tests/unexpected_eid_fw_host.rs", | |
| edition = "2024", | |
| deps = [ | |
| ":pldm_service", | |
| "//services/mctp/api:mctp_api", | |
| "//services/mctp/server:mctp_server_lib", | |
| "@rust_crates//:mctp", | |
| "@rust_crates//:mctp-lib", | |
| "@rust_crates//:pldm-common", | |
| "@rust_crates//:pldm-interface", | |
| ], | |
| ) |