diff options
| author | David Lönnhager <david.l@mullvad.net> | 2023-12-27 14:38:36 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-01-08 11:34:07 +0100 |
| commit | 857febc80eaff8f5efc4239b2c625fcfbee78999 (patch) | |
| tree | ce29bea94421884ff91021efa8b43d21088edf3c /test/test-manager/src/run_tests.rs | |
| parent | aca939c260f718e3806a67b0a0703a33d4c8157f (diff) | |
| download | mullvadvpn-857febc80eaff8f5efc4239b2c625fcfbee78999.tar.xz mullvadvpn-857febc80eaff8f5efc4239b2c625fcfbee78999.zip | |
Add 'target_os' attribute to test macro
Diffstat (limited to 'test/test-manager/src/run_tests.rs')
| -rw-r--r-- | test/test-manager/src/run_tests.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test-manager/src/run_tests.rs b/test/test-manager/src/run_tests.rs index 4a296ce288..b316511b06 100644 --- a/test/test-manager/src/run_tests.rs +++ b/test/test-manager/src/run_tests.rs @@ -1,5 +1,5 @@ use crate::summary::{self, maybe_log_test_result}; -use crate::tests::TestContext; +use crate::tests::{config::TEST_CONFIG, TestContext}; use crate::{ logging::{panic_as_string, TestOutput}, mullvad_daemon, tests, @@ -26,7 +26,7 @@ pub async fn run( mut summary_logger: Option<summary::SummaryLogger>, ) -> Result<()> { log::trace!("Setting test constants"); - tests::config::TEST_CONFIG.init(config); + TEST_CONFIG.init(config); let pty_path = instance.get_pty(); @@ -47,7 +47,9 @@ pub async fn run( let mullvad_client = mullvad_daemon::new_rpc_client(connection_handle, mullvad_daemon_transport); - let mut tests: Vec<_> = inventory::iter::<tests::TestMetadata>().collect(); + let mut tests: Vec<_> = inventory::iter::<tests::TestMetadata>() + .filter(|test| test.should_run_on_os(TEST_CONFIG.os)) + .collect(); tests.sort_by_key(|test| test.priority.unwrap_or(0)); if !test_filters.is_empty() { |
