@@ -23,9 +23,6 @@ use test_rpc::meta::Os;
23
23
/// * `priority` - The order in which tests will be run where low numbers run before high numbers
24
24
/// and tests with the same number run in undefined order. `priority` defaults to 0.
25
25
///
26
- /// * `always_run` - If the test should always run regardless of what test filters are provided by
27
- /// the user. `always_run` defaults to false.
28
- ///
29
26
/// * `target_os` - The test should only run on the specified OS. This can currently be set to
30
27
/// `linux`, `windows`, or `macos`.
31
28
///
@@ -48,10 +45,10 @@ use test_rpc::meta::Os;
48
45
///
49
46
/// ## Create a test with custom parameters
50
47
///
51
- /// This test will run early in the test loop and will always run .
48
+ /// This test will run early in the test loop.
52
49
///
53
50
/// ```ignore
54
- /// #[test_function(priority = -1337, always_run = true )]
51
+ /// #[test_function(priority = -1337)]
55
52
/// pub async fn test_function(
56
53
/// rpc: ServiceClient,
57
54
/// mut mullvad_client: mullvad_management_interface::MullvadProxyClient,
@@ -105,7 +102,6 @@ fn parse_marked_test_function(
105
102
106
103
fn get_test_macro_parameters ( attributes : & syn:: AttributeArgs ) -> Result < MacroParameters > {
107
104
let mut priority = None ;
108
- let mut always_run = false ;
109
105
let mut targets = vec ! [ ] ;
110
106
111
107
for attribute in attributes {
@@ -120,11 +116,6 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result<MacroPar
120
116
Lit :: Int ( lit_int) => priority = Some ( lit_int. base10_parse ( ) . unwrap ( ) ) ,
121
117
_ => bail ! ( nv, "'priority' should have an integer value" ) ,
122
118
}
123
- } else if nv. path . is_ident ( "always_run" ) {
124
- match lit {
125
- Lit :: Bool ( lit_bool) => always_run = lit_bool. value ( ) ,
126
- _ => bail ! ( nv, "'always_run' should have a bool value" ) ,
127
- }
128
119
} else if nv. path . is_ident ( "target_os" ) {
129
120
let Lit :: Str ( lit_str) = lit else {
130
121
bail ! ( nv, "'target_os' should have a string value" ) ;
@@ -145,11 +136,7 @@ fn get_test_macro_parameters(attributes: &syn::AttributeArgs) -> Result<MacroPar
145
136
}
146
137
}
147
138
148
- Ok ( MacroParameters {
149
- priority,
150
- always_run,
151
- targets,
152
- } )
139
+ Ok ( MacroParameters { priority, targets } )
153
140
}
154
141
155
142
fn create_test ( test_function : TestFunction ) -> proc_macro2:: TokenStream {
@@ -165,8 +152,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream {
165
152
} )
166
153
. collect ( ) ;
167
154
168
- let always_run = test_function. macro_parameters . always_run ;
169
-
170
155
let func_name = test_function. name ;
171
156
let function_mullvad_version = test_function. function_parameters . mullvad_client . version ( ) ;
172
157
let wrapper_closure = match test_function. function_parameters . mullvad_client {
@@ -207,7 +192,6 @@ fn create_test(test_function: TestFunction) -> proc_macro2::TokenStream {
207
192
mullvad_client_version: #function_mullvad_version,
208
193
func: #wrapper_closure,
209
194
priority: #test_function_priority,
210
- always_run: #always_run,
211
195
} ) ;
212
196
}
213
197
}
@@ -220,7 +204,6 @@ struct TestFunction {
220
204
221
205
struct MacroParameters {
222
206
priority : Option < i32 > ,
223
- always_run : bool ,
224
207
targets : Vec < Os > ,
225
208
}
226
209
0 commit comments