From 6ae817ed7a8c21485f1e14a93f0784ff526996e1 Mon Sep 17 00:00:00 2001 From: David Stevens Date: Thu, 24 Mar 2022 19:15:38 +0900 Subject: [PATCH] Add release-test profile Add a release-test profile that is the release profile with panic=unwind. This profile is needed because crosvm has a cdylib dependency (crosvm_plugin). If we try to run cargo test with panic=abort, cargo builds a second version of the cdylib artifact without panic=abort. However, cargo doesn't actually support duplicate artifacts [1]. This can lead to flaky build failures if cargo ends up trying to build both artifacts at the same time. [1] https://github.com/rust-lang/cargo/issues/6313 BUG=None TEST=CQ Change-Id: Ie5881878efdee654e9a665fa58d21aa2280a1876 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3545739 Reviewed-by: Dennis Kempin Tested-by: kokoro Reviewed-by: Daniel Verkamp Commit-Queue: Daniel Verkamp --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 6d79d4445e..3e25dc1b02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,10 @@ required-features = [ "direct" ] panic = 'abort' overflow-checks = true +[profile.release-test] +inherits = 'release' +panic = 'unwind' + # Reproduces the options used when building crosvm for Chrome OS. [profile.chromeos] inherits = "release"