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 <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
David Stevens 2022-03-24 19:15:38 +09:00 committed by Chromeos LUCI
parent 3f7495983a
commit 6ae817ed7a

View file

@ -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"