From 2638aafdbb0ceeefb271603f7396a9b80db074d9 Mon Sep 17 00:00:00 2001 From: Hsuan Ting Chen Date: Mon, 6 May 2024 18:44:41 +0800 Subject: [PATCH] flashrom-tester: Include flashrom/src/cmd.rs tests in Cargo workspace Ensure ChromeOS ebuild (ecargo_test) runs all unit tests, including those under flashrom/src/cmd.rs which were previously being skipped due to not being in the default Cargo workspace. By adding flashrom/ to the [workspace] section of Cargo.toml, these tests will now be consistently included when building and testing flashrom-tester on ChromeOS. References: * ebuild of flashrom-tester: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/refs/heads/main/sys-apps/flashrom-tester/flashrom-tester-9999.ebuild * ecarg_test: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/refs/heads/main/eclass/cros-rust.eclass#765 BUG=b:338962302 TEST=(ChromeOS) FEATURES=`test emerge-corsola flashrom-tester` Could see tests like `cmd::tests::decode_io_opt ... ok` TEST=(UPSTREAM) 1. Build flashrom by `meson` 2. Build bindings/rust/libflashrom by `cargo build` 3. Build util/flashrom_tester by `cargo build` `cargo test --workspace` Could see tests like `cmd::tests::decode_io_opt ... ok` Change-Id: Ic23bc35592e6d7d8dd24c71630ea9a2eb2d58573 Signed-off-by: Hsuan Ting Chen Reviewed-on: https://review.coreboot.org/c/flashrom/+/82231 Reviewed-by: Anastasia Klimchuk Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- util/flashrom_tester/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/flashrom_tester/Cargo.toml b/util/flashrom_tester/Cargo.toml index a76a5b432..50c73dd72 100644 --- a/util/flashrom_tester/Cargo.toml +++ b/util/flashrom_tester/Cargo.toml @@ -15,6 +15,9 @@ name = "flashrom_tester" name = "flashrom_tester" required-features = ["cli"] +[workspace] +members = [".", "flashrom"] + [dependencies] atty = "0.2" built = { version = "0.5", features = ["chrono"] }