Skip to content

Commit c47986b

Browse files
committed
auto merge of #10394 : yichoi/rust/make_check_pass_android, r=brson
To enable test on android bot #9120 some tests are disabled and can be fixed further.
2 parents be79d7e + 9bb1e25 commit c47986b

File tree

69 files changed

+85
-162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+85
-162
lines changed

src/librustuv/addrinfo.rs

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ mod test {
191191
use super::super::local_loop;
192192

193193
#[test]
194+
#[ignore(cfg(target_os="android"))] // cannot give tcp/ip permission without help of apk
194195
fn getaddrinfo_test() {
195196
match GetAddrInfoRequest::run(local_loop(), Some("localhost"), None, None) {
196197
Ok(infos) => {

src/libstd/rt/io/net/addrinfo.rs

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ mod test {
114114
use super::*;
115115

116116
#[test]
117+
#[ignore(cfg(target_os="android"))] // cannot give tcp/ip permission without help of apk
117118
fn dns_smoke_test() {
118119
let ipaddrs = get_host_addresses("localhost").unwrap();
119120
let mut found_local = false;

src/libstd/rt/io/signal.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ mod test {
161161
}
162162
}
163163

164-
#[test] #[cfg(unix)]
164+
#[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378)
165165
fn test_io_signal_smoketest() {
166166
let mut signal = Listener::new();
167167
signal.register(Interrupt);
@@ -173,7 +173,7 @@ mod test {
173173
}
174174
}
175175

176-
#[test] #[cfg(unix)]
176+
#[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378)
177177
fn test_io_signal_two_signal_one_signum() {
178178
let mut s1 = Listener::new();
179179
let mut s2 = Listener::new();
@@ -191,7 +191,7 @@ mod test {
191191
}
192192
}
193193

194-
#[test] #[cfg(unix)]
194+
#[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378)
195195
fn test_io_signal_unregister() {
196196
let mut s1 = Listener::new();
197197
let mut s2 = Listener::new();

src/libstd/run.rs

+7-99
Original file line numberDiff line numberDiff line change
@@ -339,20 +339,14 @@ mod tests {
339339
use rt::io::{Writer, Reader};
340340

341341
#[test]
342-
#[cfg(not(target_os="android"))]
342+
#[cfg(not(target_os="android"))] // FIXME(#10380)
343343
fn test_process_status() {
344344
assert_eq!(run::process_status("false", []), 1);
345345
assert_eq!(run::process_status("true", []), 0);
346346
}
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-
}
353347

354348
#[test]
355-
#[cfg(not(target_os="android"))]
349+
#[cfg(not(target_os="android"))] // FIXME(#10380)
356350
fn test_process_output_output() {
357351

358352
let run::ProcessOutput {status, output, error}
@@ -366,24 +360,9 @@ mod tests {
366360
assert_eq!(error, ~[]);
367361
}
368362
}
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-
}
384363
385364
#[test]
386-
#[cfg(not(target_os="android"))]
365+
#[cfg(not(target_os="android"))] // FIXME(#10380)
387366
fn test_process_output_error() {
388367
389368
let run::ProcessOutput {status, output, error}
@@ -393,17 +372,6 @@ mod tests {
393372
assert_eq!(output, ~[]);
394373
assert!(!error.is_empty());
395374
}
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-
}
407375
408376
#[test]
409377
#[ignore] // FIXME(#10016) cat never sees stdin close
@@ -454,37 +422,22 @@ mod tests {
454422
}
455423
456424
#[test]
457-
#[cfg(not(target_os="android"))]
425+
#[cfg(not(target_os="android"))] // FIXME(#10380)
458426
fn test_finish_once() {
459427
let mut prog = run::Process::new("false", [], run::ProcessOptions::new());
460428
assert_eq!(prog.finish(), 1);
461429
}
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-
}
469430
470431
#[test]
471-
#[cfg(not(target_os="android"))]
432+
#[cfg(not(target_os="android"))] // FIXME(#10380)
472433
fn test_finish_twice() {
473434
let mut prog = run::Process::new("false", [], run::ProcessOptions::new());
474435
assert_eq!(prog.finish(), 1);
475436
assert_eq!(prog.finish(), 1);
476437
}
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-
}
485438
486439
#[test]
487-
#[cfg(not(target_os="android"))]
440+
#[cfg(not(target_os="android"))] // FIXME(#10380)
488441
fn test_finish_with_output_once() {
489442
490443
let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions::new());
@@ -499,26 +452,9 @@ mod tests {
499452
assert_eq!(error, ~[]);
500453
}
501454
}
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-
}
519455
520456
#[test]
521-
#[cfg(not(target_os="android"))]
457+
#[cfg(not(target_os="android"))] // FIXME(#10380)
522458
fn test_finish_with_output_twice() {
523459
524460
let mut prog = run::Process::new("echo", [~"hello"], run::ProcessOptions::new());
@@ -544,34 +480,6 @@ mod tests {
544480
assert_eq!(error, ~[]);
545481
}
546482
}
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-
}
575483
576484
#[cfg(unix,not(target_os="android"))]
577485
fn run_pwd(dir: Option<&Path>) -> run::Process {

src/libstd/unstable/dynamic_lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ mod test {
9090

9191
#[test]
9292
#[ignore(cfg(windows))] // FIXME #8818
93+
#[ignore(cfg(target_os="android"))] // FIXME(#10379)
9394
fn test_loading_cosine() {
9495
// The math library does not need to be loaded since it is already
9596
// statically linked in

src/test/bench/shootout-k-nucleotide-pipes.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// xfail-android: FIXME(#10393)
12+
1113
// xfail-pretty the `let to_child` line gets an extra newline
1214
// multi tasking k-nucleotide
1315

src/test/debug-info/basic-types-metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/basic-types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// about UTF-32 character encoding and will print a rust char as only
1515
// its numerical value.
1616

17-
// xfail-android
17+
// xfail-android: FIXME(#10381)
1818

1919
// compile-flags:-Z extra-debug-info
2020
// debugger:rbreak zzz

src/test/debug-info/borrowed-basic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
1414
// its numerical value.

src/test/debug-info/borrowed-c-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/borrowed-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/boxed-vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
#[feature(managed_boxes)];
1414

src/test/debug-info/by-value-non-immediate-argument.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/by-value-self-argument-in-trait-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
#[feature(managed_boxes)];
1414

src/test/debug-info/c-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/closure-in-generic-function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/destructured-fn-argument.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
#[feature(managed_boxes)];
1414

src/test/debug-info/evec-in-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:set print pretty off

src/test/debug-info/generic-function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/generic-functions-nested.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/generic-method-on-generic-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/generic-static-method-on-struct-and-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

src/test/debug-info/generic-struct-style-enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:set print union on

src/test/debug-info/generic-struct.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
11+
// xfail-android: FIXME(#10381)
1212

1313
// compile-flags:-Z extra-debug-info
1414
// debugger:rbreak zzz

0 commit comments

Comments
 (0)