diff --git a/test/test-manager/src/run_tests.rs b/test/test-manager/src/run_tests.rs index 907575fb6075..5d1a1f8434fa 100644 --- a/test/test-manager/src/run_tests.rs +++ b/test/test-manager/src/run_tests.rs @@ -147,9 +147,6 @@ pub async fn run( if !test_filters.is_empty() { tests.retain(|test| { - if test.always_run { - return true; - } for command in test_filters { let command = command.to_lowercase(); if test.command.to_lowercase().contains(&command) { diff --git a/test/test-manager/src/tests/test_metadata.rs b/test/test-manager/src/tests/test_metadata.rs index d3d7a4040796..70476ac19959 100644 --- a/test/test-manager/src/tests/test_metadata.rs +++ b/test/test-manager/src/tests/test_metadata.rs @@ -8,7 +8,6 @@ pub struct TestMetadata { pub mullvad_client_version: MullvadClientVersion, pub func: TestWrapperFunction, pub priority: Option, - pub always_run: bool, } impl TestMetadata { diff --git a/test/test-manager/test_macro/src/lib.rs b/test/test-manager/test_macro/src/lib.rs index 5a14a51c6b4a..1b80776f29a4 100644 --- a/test/test-manager/test_macro/src/lib.rs +++ b/test/test-manager/test_macro/src/lib.rs @@ -23,9 +23,6 @@ use test_rpc::meta::Os; /// * `priority` - The order in which tests will be run where low numbers run before high numbers /// and tests with the same number run in undefined order. `priority` defaults to 0. /// -/// * `always_run` - If the test should always run regardless of what test filters are provided by -/// the user. `always_run` defaults to false. -/// /// * `target_os` - The test should only run on the specified OS. This can currently be set to /// `linux`, `windows`, or `macos`. /// @@ -48,10 +45,10 @@ use test_rpc::meta::Os; /// /// ## Create a test with custom parameters /// -/// This test will run early in the test loop and will always run. +/// This test will run early in the test loop. /// /// ```ignore -/// #[test_function(priority = -1337, always_run = true)] +/// #[test_function(priority = -1337)] /// pub async fn test_function( /// rpc: ServiceClient, /// mut mullvad_client: mullvad_management_interface::MullvadProxyClient, @@ -105,7 +102,6 @@ fn parse_marked_test_function( fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result { let mut priority = None; - let mut always_run = false; let mut targets = vec![]; for attribute in attributes { @@ -120,11 +116,6 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result priority = Some(lit_int.base10_parse().unwrap()), _ => bail!(nv, "'priority' should have an integer value"), } - } else if nv.path.is_ident("always_run") { - match lit { - Lit::Bool(lit_bool) => always_run = lit_bool.value(), - _ => bail!(nv, "'always_run' should have a bool value"), - } } else if nv.path.is_ident("target_os") { let Lit::Str(lit_str) = lit else { bail!(nv, "'target_os' should have a string value"); @@ -145,11 +136,7 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result proc_macro2::TokenStream { @@ -165,8 +152,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream { }) .collect(); - let always_run = test_function.macro_parameters.always_run; - let func_name = test_function.name; let function_mullvad_version = test_function.function_parameters.mullvad_client.version(); let wrapper_closure = match test_function.function_parameters.mullvad_client { @@ -207,7 +192,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream { mullvad_client_version: #function_mullvad_version, func: #wrapper_closure, priority: #test_function_priority, - always_run: #always_run, }); } } @@ -220,7 +204,6 @@ struct TestFunction { struct MacroParameters { priority: Option, - always_run: bool, targets: Vec, }