@@ -257,14 +257,14 @@ pub fn uu_app() -> Command {
257257}
258258
259259#[ cfg( test) ]
260+ #[ cfg( target_os = "linux" ) ]
260261mod tests {
261262 use crate :: {
262263 fetch_cmdline, fetch_pcpu_time, fetch_terminal_number, format_time, get_clock_tick,
263264 } ;
264265 use std:: { fs, path:: Path , process} ;
265266
266267 #[ test]
267- #[ cfg( target_os = "linux" ) ]
268268 fn test_format_time ( ) {
269269 let unix_epoc = chrono:: Local :: now ( )
270270 . format ( "%Y-%m-%d %H:%M:%S%.6f %::z" )
@@ -284,7 +284,6 @@ mod tests {
284284 }
285285
286286 #[ test]
287- #[ cfg( target_os = "linux" ) ]
288287 // Get PID of current process and use that for cmdline testing
289288 fn test_fetch_cmdline ( ) {
290289 // uucore's utmpx returns an i32, so we cast to that to mimic it.
@@ -297,7 +296,6 @@ mod tests {
297296 }
298297
299298 #[ test]
300- #[ cfg( target_os = "linux" ) ]
301299 fn test_fetch_terminal_number ( ) {
302300 let pid = process:: id ( ) as i32 ;
303301 let path = Path :: new ( "/proc" ) . join ( pid. to_string ( ) ) . join ( "stat" ) ;
@@ -308,7 +306,6 @@ mod tests {
308306 }
309307
310308 #[ test]
311- #[ cfg( target_os = "linux" ) ]
312309 fn test_fetch_pcpu_time ( ) {
313310 let pid = process:: id ( ) as i32 ;
314311 let path = Path :: new ( "/proc" ) . join ( pid. to_string ( ) ) . join ( "stat" ) ;
0 commit comments