File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,7 @@ pub fn walk_process() -> impl Iterator<Item = ProcessInformation> {
381381#[ cfg( test) ]
382382mod tests {
383383 use super :: * ;
384+ #[ cfg( target_os = "linux" ) ]
384385 use std:: { collections:: HashSet , str:: FromStr } ;
385386
386387 #[ test]
@@ -398,6 +399,7 @@ mod tests {
398399 assert ! ( RunState :: try_from( "Rg" ) . is_err( ) ) ;
399400 }
400401
402+ #[ cfg( target_os = "linux" ) ]
401403 fn current_pid ( ) -> usize {
402404 // Direct read link of /proc/self.
403405 // It's result must be current programs pid.
@@ -410,6 +412,7 @@ mod tests {
410412 }
411413
412414 #[ test]
415+ #[ cfg( target_os = "linux" ) ]
413416 fn test_walk_pid ( ) {
414417 let current_pid = current_pid ( ) ;
415418
@@ -419,6 +422,7 @@ mod tests {
419422 }
420423
421424 #[ test]
425+ #[ cfg( target_os = "linux" ) ]
422426 fn test_pid_entry ( ) {
423427 let current_pid = current_pid ( ) ;
424428
You can’t perform that action at this time.
0 commit comments