@@ -339,20 +339,14 @@ mod tests {
339
339
use rt:: io:: { Writer , Reader } ;
340
340
341
341
#[ test]
342
- #[ cfg( not( target_os="android" ) ) ]
342
+ #[ cfg( not( target_os="android" ) ) ] // FIXME(#10380)
343
343
fn test_process_status ( ) {
344
344
assert_eq ! ( run:: process_status( "false" , [ ] ) , 1 ) ;
345
345
assert_eq ! ( run:: process_status( "true" , [ ] ) , 0 ) ;
346
346
}
347
- #[ test]
348
- #[ cfg( target_os="android" ) ]
349
- fn test_process_status ( ) {
350
- assert_eq ! ( run:: process_status( "/system/bin/sh" , [ ~"-c",~" false "]), 1);
351
- assert_eq!(run::process_status(" /system/bin/sh", [~" -c",~" true "]), 0);
352
- }
353
347
354
348
#[ test]
355
- #[cfg(not(target_os=" android"))]
349
+ #[ cfg( not( target_os="android" ) ) ] // FIXME(#10380)
356
350
fn test_process_output_output ( ) {
357
351
358
352
let run:: ProcessOutput { status, output, error}
@@ -366,24 +360,9 @@ mod tests {
366
360
assert_eq!(error, ~[]);
367
361
}
368
362
}
369
- #[test]
370
- #[cfg(target_os=" android")]
371
- fn test_process_output_output() {
372
-
373
- let run::ProcessOutput {status, output, error}
374
- = run::process_output(" /system/bin/sh", [~" -c",~" echo hello"]);
375
- let output_str = str::from_utf8(output);
376
-
377
- assert_eq!(status, 0);
378
- assert_eq!(output_str.trim().to_owned(), ~" hello");
379
- // FIXME #7224
380
- if !running_on_valgrind() {
381
- assert_eq!(error, ~[]);
382
- }
383
- }
384
363
385
364
#[test]
386
- #[cfg(not(target_os=" android"))]
365
+ #[cfg(not(target_os=" android"))] // FIXME(#10380)
387
366
fn test_process_output_error() {
388
367
389
368
let run::ProcessOutput {status, output, error}
@@ -393,17 +372,6 @@ mod tests {
393
372
assert_eq!(output, ~[]);
394
373
assert!(!error.is_empty());
395
374
}
396
- #[test]
397
- #[cfg(target_os=" android")]
398
- fn test_process_output_error() {
399
-
400
- let run::ProcessOutput {status, output, error}
401
- = run::process_output(" /system/bin/mkdir", [~" . "]);
402
-
403
- assert_eq!(status, 255);
404
- assert_eq!(output, ~[]);
405
- assert!(!error.is_empty());
406
- }
407
375
408
376
#[test]
409
377
#[ignore] // FIXME(#10016) cat never sees stdin close
@@ -454,37 +422,22 @@ mod tests {
454
422
}
455
423
456
424
#[test]
457
- #[cfg(not(target_os=" android"))]
425
+ #[cfg(not(target_os=" android"))] // FIXME(#10380)
458
426
fn test_finish_once() {
459
427
let mut prog = run::Process::new(" false ", [], run::ProcessOptions::new());
460
428
assert_eq!(prog.finish(), 1);
461
429
}
462
- #[test]
463
- #[cfg(target_os=" android")]
464
- fn test_finish_once() {
465
- let mut prog = run::Process::new(" /system/bin/sh", [~" -c",~" false "],
466
- run::ProcessOptions::new());
467
- assert_eq!(prog.finish(), 1);
468
- }
469
430
470
431
#[test]
471
- #[cfg(not(target_os=" android"))]
432
+ #[cfg(not(target_os=" android"))] // FIXME(#10380)
472
433
fn test_finish_twice() {
473
434
let mut prog = run::Process::new(" false ", [], run::ProcessOptions::new());
474
435
assert_eq!(prog.finish(), 1);
475
436
assert_eq!(prog.finish(), 1);
476
437
}
477
- #[test]
478
- #[cfg(target_os=" android")]
479
- fn test_finish_twice() {
480
- let mut prog = run::Process::new(" /system/bin/sh", [~" -c",~" false "],
481
- run::ProcessOptions::new());
482
- assert_eq!(prog.finish(), 1);
483
- assert_eq!(prog.finish(), 1);
484
- }
485
438
486
439
#[test]
487
- #[cfg(not(target_os=" android"))]
440
+ #[cfg(not(target_os=" android"))] // FIXME(#10380)
488
441
fn test_finish_with_output_once() {
489
442
490
443
let mut prog = run::Process::new(" echo", [~" hello"], run::ProcessOptions::new());
@@ -499,26 +452,9 @@ mod tests {
499
452
assert_eq!(error, ~[]);
500
453
}
501
454
}
502
- #[test]
503
- #[cfg(target_os=" android")]
504
- fn test_finish_with_output_once() {
505
-
506
- let mut prog = run::Process::new(" /system/bin/sh", [~" -c",~" echo hello"],
507
- run::ProcessOptions::new());
508
- let run::ProcessOutput {status, output, error}
509
- = prog.finish_with_output();
510
- let output_str = str::from_utf8(output);
511
-
512
- assert_eq!(status, 0);
513
- assert_eq!(output_str.trim().to_owned(), ~" hello");
514
- // FIXME #7224
515
- if !running_on_valgrind() {
516
- assert_eq!(error, ~[]);
517
- }
518
- }
519
455
520
456
#[test]
521
- #[cfg(not(target_os=" android"))]
457
+ #[cfg(not(target_os=" android"))] // FIXME(#10380)
522
458
fn test_finish_with_output_twice() {
523
459
524
460
let mut prog = run::Process::new(" echo", [~" hello"], run::ProcessOptions::new());
@@ -544,34 +480,6 @@ mod tests {
544
480
assert_eq!(error, ~[]);
545
481
}
546
482
}
547
- #[test]
548
- #[cfg(target_os=" android")]
549
- fn test_finish_with_output_twice() {
550
-
551
- let mut prog = run::Process::new(" /system/bin/sh", [~" -c",~" echo hello"],
552
- run::ProcessOptions::new());
553
- let run::ProcessOutput {status, output, error}
554
- = prog.finish_with_output();
555
-
556
- let output_str = str::from_utf8(output);
557
-
558
- assert_eq!(status, 0);
559
- assert_eq!(output_str.trim().to_owned(), ~" hello");
560
- // FIXME #7224
561
- if !running_on_valgrind() {
562
- assert_eq!(error, ~[]);
563
- }
564
-
565
- let run::ProcessOutput {status, output, error}
566
- = prog.finish_with_output();
567
-
568
- assert_eq!(status, 0);
569
- assert_eq!(output, ~[]);
570
- // FIXME #7224
571
- if !running_on_valgrind() {
572
- assert_eq!(error, ~[]);
573
- }
574
- }
575
483
576
484
#[cfg(unix,not(target_os=" android"))]
577
485
fn run_pwd(dir: Option<&Path>) -> run::Process {
0 commit comments