mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 22:48:43 +00:00
21 lines
585 B
Rust
21 lines
585 B
Rust
#[allow(dead_code)]
|
|
#[path = "../../src/nvidia/kernel/hypervisor.rs"]
|
|
mod hypervisor;
|
|
|
|
fn main() {
|
|
let expected: u8 = std::env::args().nth(1).unwrap().parse().unwrap();
|
|
if expected == 8 {
|
|
assert_eq!(
|
|
hypervisor::BuildProduct::current(),
|
|
Err(hypervisor::UnresolvedBuildProduct)
|
|
);
|
|
return;
|
|
}
|
|
let product = hypervisor::BuildProduct::current().unwrap();
|
|
assert_eq!(
|
|
product.roles(),
|
|
[expected & 1 != 0, expected & 2 != 0, expected & 4 != 0]
|
|
);
|
|
assert_eq!(product.is_vgx_hyper(), expected != 0);
|
|
}
|