mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
fix: tests
This commit is contained in:
parent
141329caab
commit
14429fd67c
@ -9,6 +9,7 @@ fn main() {
|
|||||||
.header("include/intel.h")
|
.header("include/intel.h")
|
||||||
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
|
||||||
.dynamic_library_name("IntelDrm")
|
.dynamic_library_name("IntelDrm")
|
||||||
|
.generate_comments(false)
|
||||||
.generate()
|
.generate()
|
||||||
.expect("Unable to generate intel bindings")
|
.expect("Unable to generate intel bindings")
|
||||||
.write_to_file(out_path.join("intel_bindings.rs"))
|
.write_to_file(out_path.join("intel_bindings.rs"))
|
||||||
|
@ -936,7 +936,6 @@ fn load_controllers(base_path: &Path) -> anyhow::Result<BTreeMap<String, Box<dyn
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
let nvml: LazyCell<Option<Rc<Nvml>>> = LazyCell::new(|| None);
|
let nvml: LazyCell<Option<Rc<Nvml>>> = LazyCell::new(|| None);
|
||||||
|
|
||||||
#[cfg(not(test))]
|
|
||||||
let amd_drm: LazyCell<Option<LibDrmAmdgpu>> = LazyCell::new(|| match LibDrmAmdgpu::new() {
|
let amd_drm: LazyCell<Option<LibDrmAmdgpu>> = LazyCell::new(|| match LibDrmAmdgpu::new() {
|
||||||
Ok(drm) => {
|
Ok(drm) => {
|
||||||
info!("AMDGPU DRM initialized");
|
info!("AMDGPU DRM initialized");
|
||||||
@ -947,10 +946,7 @@ fn load_controllers(base_path: &Path) -> anyhow::Result<BTreeMap<String, Box<dyn
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
#[cfg(test)]
|
|
||||||
let amd_drm: LazyCell<Option<LibDrmAmdgpu>> = LazyCell::new(|| None);
|
|
||||||
|
|
||||||
#[cfg(not(test))]
|
|
||||||
let intel_drm: LazyCell<Option<Rc<IntelDrm>>> = unsafe {
|
let intel_drm: LazyCell<Option<Rc<IntelDrm>>> = unsafe {
|
||||||
LazyCell::new(|| match IntelDrm::new("libdrm_intel.so.1") {
|
LazyCell::new(|| match IntelDrm::new("libdrm_intel.so.1") {
|
||||||
Ok(drm) => {
|
Ok(drm) => {
|
||||||
@ -963,8 +959,6 @@ fn load_controllers(base_path: &Path) -> anyhow::Result<BTreeMap<String, Box<dyn
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
#[cfg(test)]
|
|
||||||
let intel_drm: LazyCell<Option<Rc<IntelDrm>>> = LazyCell::new(|| None);
|
|
||||||
|
|
||||||
for entry in base_path
|
for entry in base_path
|
||||||
.read_dir()
|
.read_dir()
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: lact-daemon/src/tests/mod.rs
|
source: lact-daemon/src/tests/mod.rs
|
||||||
expression: device_info
|
expression: device_info
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
{
|
{
|
||||||
"clocks_info": {
|
"clocks_info": {
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
---
|
|
||||||
source: lact-daemon/src/tests/mod.rs
|
|
||||||
assertion_line: 29
|
|
||||||
expression: device_info
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
{
|
|
||||||
"clocks_info": null,
|
|
||||||
"info": {
|
|
||||||
"driver": "i915",
|
|
||||||
"link_info": {
|
|
||||||
"current_speed": "Unknown",
|
|
||||||
"current_width": "0"
|
|
||||||
},
|
|
||||||
"pci_info": {
|
|
||||||
"device_pci_info": {
|
|
||||||
"model": "CometLake-U GT2 [UHD Graphics]",
|
|
||||||
"model_id": "9B41",
|
|
||||||
"vendor": "Intel Corporation",
|
|
||||||
"vendor_id": "8086"
|
|
||||||
},
|
|
||||||
"subsystem_pci_info": {
|
|
||||||
"model_id": "22B1",
|
|
||||||
"vendor": "Lenovo",
|
|
||||||
"vendor_id": "17AA"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pci_info": {
|
|
||||||
"device_pci_info": {
|
|
||||||
"model": "CometLake-U GT2 [UHD Graphics]",
|
|
||||||
"model_id": "9B41",
|
|
||||||
"vendor": "Intel Corporation",
|
|
||||||
"vendor_id": "8086"
|
|
||||||
},
|
|
||||||
"subsystem_pci_info": {
|
|
||||||
"model_id": "22B1",
|
|
||||||
"vendor": "Lenovo",
|
|
||||||
"vendor_id": "17AA"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"power_profile_modes": null,
|
|
||||||
"stats": {
|
|
||||||
"clockspeed": {},
|
|
||||||
"fan": {
|
|
||||||
"control_enabled": false,
|
|
||||||
"pmfw_info": {}
|
|
||||||
},
|
|
||||||
"power": {},
|
|
||||||
"temps": {},
|
|
||||||
"voltage": {},
|
|
||||||
"vram": {}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,54 +0,0 @@
|
|||||||
---
|
|
||||||
source: lact-daemon/src/tests/mod.rs
|
|
||||||
assertion_line: 29
|
|
||||||
expression: device_info
|
|
||||||
snapshot_kind: text
|
|
||||||
---
|
|
||||||
{
|
|
||||||
"clocks_info": null,
|
|
||||||
"info": {
|
|
||||||
"driver": "xe",
|
|
||||||
"link_info": {
|
|
||||||
"current_speed": "Unknown",
|
|
||||||
"current_width": "0"
|
|
||||||
},
|
|
||||||
"pci_info": {
|
|
||||||
"device_pci_info": {
|
|
||||||
"model": "TigerLake-LP GT2 [Iris Xe Graphics]",
|
|
||||||
"model_id": "9A49",
|
|
||||||
"vendor": "Intel Corporation",
|
|
||||||
"vendor_id": "8086"
|
|
||||||
},
|
|
||||||
"subsystem_pci_info": {
|
|
||||||
"model_id": "3F19",
|
|
||||||
"vendor": "Lenovo",
|
|
||||||
"vendor_id": "17AA"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pci_info": {
|
|
||||||
"device_pci_info": {
|
|
||||||
"model": "TigerLake-LP GT2 [Iris Xe Graphics]",
|
|
||||||
"model_id": "9A49",
|
|
||||||
"vendor": "Intel Corporation",
|
|
||||||
"vendor_id": "8086"
|
|
||||||
},
|
|
||||||
"subsystem_pci_info": {
|
|
||||||
"model_id": "3F19",
|
|
||||||
"vendor": "Lenovo",
|
|
||||||
"vendor_id": "17AA"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"power_profile_modes": null,
|
|
||||||
"stats": {
|
|
||||||
"clockspeed": {},
|
|
||||||
"fan": {
|
|
||||||
"control_enabled": false,
|
|
||||||
"pmfw_info": {}
|
|
||||||
},
|
|
||||||
"power": {},
|
|
||||||
"temps": {},
|
|
||||||
"voltage": {},
|
|
||||||
"vram": {}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user