crosvm: disable tests parsing virglrenderer mode if virgl_renderer is disabled

crrev.com/c/3971026 put GpuMode::ModeVirglRenderer behind the
`virgl_renderer` feature, but did not disable all the tests that try to
parse the virgl renderer.

BUG=None
TEST=`cargo test --features "gpu" parse_gpu` passes.
TEST=`cargo test --features "gpu,virgl_renderer,virgl_renderer_next" parse_gpu` passes.

Change-Id: I1018d5021b81484b6d747e15aa60edf005c1f53a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3977489
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Pujun Lun <lunpujun@google.com>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Alexandre Courbot 2022-10-25 12:21:37 +09:00 committed by crosvm LUCI
parent 54a22c93ab
commit 439d455c9a

View file

@ -503,6 +503,7 @@ mod tests {
#[cfg(feature = "gpu")]
#[test]
fn parse_gpu_options_default_vulkan_support() {
#[cfg(feature = "virgl_renderer")]
{
let gpu_params: GpuParameters = parse_gpu_options("backend=virglrenderer").unwrap();
assert_eq!(gpu_params.use_vulkan, None);
@ -515,7 +516,7 @@ mod tests {
}
}
#[cfg(feature = "gpu")]
#[cfg(all(feature = "gpu", feature = "virglrenderer"))]
#[test]
fn parse_gpu_options_with_vulkan_specified() {
{
@ -554,7 +555,7 @@ mod tests {
}
}
#[cfg(feature = "gpu")]
#[cfg(all(feature = "gpu", feature = "virgl_renderer"))]
#[test]
fn parse_gpu_options_gfxstream_with_wsi_specified() {
use rutabaga_gfx::RutabagaWsi;