rusticl/device: skip loading devices in cfg(test)

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35188>
This commit is contained in:
Dallas Strouse 2025-01-24 16:58:55 -06:00 committed by Marge Bot
parent 85deec44d7
commit 6af462b27f

View file

@ -1333,8 +1333,12 @@ impl Device {
}
pub fn all() -> Vec<Device> {
#[cfg(not(test))]
let mut devs: Vec<_> = load_screens().filter_map(Device::new).collect();
#[cfg(test)]
let mut devs: Vec<Device> = Vec::default();
// Pick a default device. One must be the default one no matter what. And custom devices can
// only be that one if they are the only devices available.
//