From 29e1974ea6265b39a4d77231352f638722476c1c Mon Sep 17 00:00:00 2001 From: Markus Pettersson Date: Mon, 27 Nov 2023 09:31:43 +0100 Subject: [PATCH] Implement `find_cache_traces` on Window & macOS --- test/test-runner/src/app.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test-runner/src/app.rs b/test/test-runner/src/app.rs index 5cd128fb38fd..22050d7c5958 100644 --- a/test/test-runner/src/app.rs +++ b/test/test-runner/src/app.rs @@ -14,6 +14,7 @@ pub fn find_traces() -> Result, Error> { Error::Syscall })?; + let caches = find_cache_traces()?; let mut traces = vec![ Path::new(r"C:\Program Files\Mullvad VPN"), // NOTE: This only works as of `499c06decda37dc639e5f` in the Mullvad app. @@ -21,6 +22,7 @@ pub fn find_traces() -> Result, Error> { Path::new(r"C:\ProgramData\Mullvad VPN"), // NOTE: Works as of `4116ebc` (Mullvad app). &settings_dir, + &caches, ]; filter_non_existent_paths(&mut traces)?; @@ -64,7 +66,6 @@ pub fn find_traces() -> Result, Error> { .collect()) } -#[cfg(target_os = "linux")] pub fn find_cache_traces() -> Result { mullvad_paths::cache_dir().map_err(|error| Error::FileSystem(error.to_string())) } @@ -74,10 +75,11 @@ pub fn find_traces() -> Result, Error> { // TODO: Check GUI data // TODO: Check temp data + let caches = find_cache_traces()?; let mut traces = vec![ Path::new(r"/Applications/Mullvad VPN.app/"), Path::new(r"/var/log/mullvad-vpn/"), - Path::new(r"/Library/Caches/mullvad-vpn/"), + &caches, // management interface socket Path::new(r"/var/run/mullvad-vpn"), // launch daemon