diff --git a/test/test-manager/src/run_tests.rs b/test/test-manager/src/run_tests.rs index 6b3da3713808..b2b1e9534bc7 100644 --- a/test/test-manager/src/run_tests.rs +++ b/test/test-manager/src/run_tests.rs @@ -49,6 +49,8 @@ pub async fn run( let mullvad_client = mullvad_daemon::new_rpc_client(connection_handle, mullvad_daemon_transport); + print_os_version(&client).await; + let mut tests: Vec<_> = inventory::iter::() .filter(|test| test.should_run_on_os(TEST_CONFIG.os)) .collect(); @@ -220,3 +222,14 @@ where result, } } + +async fn print_os_version(client: &ServiceClient) { + match client.get_os_version().await { + Ok(version) => { + log::debug!("Guest OS version: {version}"); + } + Err(error) => { + log::debug!("Failed to obtain guest OS version: {error}"); + } + } +} diff --git a/test/test-rpc/src/meta.rs b/test/test-rpc/src/meta.rs index 7f59d3c0ba71..40dda3bb9cb0 100644 --- a/test/test-rpc/src/meta.rs +++ b/test/test-rpc/src/meta.rs @@ -9,6 +9,16 @@ pub enum OsVersion { Windows(WindowsVersion), } +impl std::fmt::Display for OsVersion { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + OsVersion::Linux => f.write_str("Linux"), + OsVersion::Macos(version) => write!(f, "macOS {}", version.major), + OsVersion::Windows(version) => write!(f, "Windows {}", version.major), + } + } +} + #[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Clone)] pub struct MacosVersion { pub major: u32,