Skip to content

Commit c4c7e0f

Browse files
committed
test: adjust some test cases of run-pass for android
1 parent f7ee7d0 commit c4c7e0f

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/test/run-pass/core-run-destroy.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,18 @@ fn test_destroy_actually_kills(force: bool) {
4242
#[cfg(windows)]
4343
static BLOCK_COMMAND: &'static str = "cmd";
4444

45-
#[cfg(unix)]
45+
#[cfg(unix,not(target_os="android"))]
4646
fn process_exists(pid: libc::pid_t) -> bool {
4747
let run::ProcessOutput {output, _} = run::process_output("ps", [~"-p", pid.to_str()]);
4848
str::from_bytes(output).contains(pid.to_str())
4949
}
5050

51+
#[cfg(unix,target_os="android")]
52+
fn process_exists(pid: libc::pid_t) -> bool {
53+
let run::ProcessOutput {output, _} = run::process_output("/system/bin/ps", [pid.to_str()]);
54+
str::from_bytes(output).contains(~"root")
55+
}
56+
5157
#[cfg(windows)]
5258
fn process_exists(pid: libc::pid_t) -> bool {
5359

src/test/run-pass/intrinsic-alignment.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mod m {
6060
pub fn main() {
6161
unsafe {
6262
assert_eq!(::rusti::pref_align_of::<u64>(), 8u);
63-
assert_eq!(::rusti::min_align_of::<u64>(), 4u);
63+
assert_eq!(::rusti::min_align_of::<u64>(), 8u);
6464
}
6565
}
6666
}

src/test/run-pass/rec-align-u64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ mod m {
6363
mod m {
6464
#[cfg(target_arch = "arm")]
6565
pub mod m {
66-
pub fn align() -> uint { 4u }
67-
pub fn size() -> uint { 12u }
66+
pub fn align() -> uint { 8u }
67+
pub fn size() -> uint { 16u }
6868
}
6969
}
7070

0 commit comments

Comments
 (0)