mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
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:
parent
85deec44d7
commit
6af462b27f
1 changed files with 4 additions and 0 deletions
|
|
@ -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.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue