From 8e86dfe14e1dca2b0ced6b39da93d52ad6f06262 Mon Sep 17 00:00:00 2001 From: Andrew Walbran Date: Thu, 10 Aug 2023 14:28:27 +0100 Subject: [PATCH] Make `tests` configuration option optional. Bug: 293289578 Test: atest cargo_embargo.test Change-Id: Ia35acdcad920e0f585cc5be650f1d1e3b6aa176d --- tools/cargo_embargo/src/config.rs | 1 + tools/cargo_embargo/testdata/plotters/cargo_embargo.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cargo_embargo/src/config.rs b/tools/cargo_embargo/src/config.rs index d5f63239b..931c10d2d 100644 --- a/tools/cargo_embargo/src/config.rs +++ b/tools/cargo_embargo/src/config.rs @@ -33,6 +33,7 @@ fn default_true() -> bool { #[serde(deny_unknown_fields)] pub struct Config { /// Whether to output "rust_test" modules. + #[serde(default)] pub tests: bool, /// Set of features to enable. If non-empty, disables the default crate features. #[serde(default)] diff --git a/tools/cargo_embargo/testdata/plotters/cargo_embargo.json b/tools/cargo_embargo/testdata/plotters/cargo_embargo.json index 5ff582552..eff124b7b 100644 --- a/tools/cargo_embargo/testdata/plotters/cargo_embargo.json +++ b/tools/cargo_embargo/testdata/plotters/cargo_embargo.json @@ -1,6 +1,5 @@ { "features": ["svg_backend", "area_series", "line_series"], - "tests": false, "package": { "plotters": { "device_supported": true