test: adjust some test cases of run-pass for android

This commit is contained in:
Young-il Choi 2013-06-17 18:50:29 +09:00
parent f7ee7d09dd
commit c4c7e0fb66
3 changed files with 10 additions and 4 deletions

View File

@ -42,12 +42,18 @@ fn test_destroy_actually_kills(force: bool) {
#[cfg(windows)]
static BLOCK_COMMAND: &'static str = "cmd";
#[cfg(unix)]
#[cfg(unix,not(target_os="android"))]
fn process_exists(pid: libc::pid_t) -> bool {
let run::ProcessOutput {output, _} = run::process_output("ps", [~"-p", pid.to_str()]);
str::from_bytes(output).contains(pid.to_str())
}
#[cfg(unix,target_os="android")]
fn process_exists(pid: libc::pid_t) -> bool {
let run::ProcessOutput {output, _} = run::process_output("/system/bin/ps", [pid.to_str()]);
str::from_bytes(output).contains(~"root")
}
#[cfg(windows)]
fn process_exists(pid: libc::pid_t) -> bool {

View File

@ -60,7 +60,7 @@ mod m {
pub fn main() {
unsafe {
assert_eq!(::rusti::pref_align_of::<u64>(), 8u);
assert_eq!(::rusti::min_align_of::<u64>(), 4u);
assert_eq!(::rusti::min_align_of::<u64>(), 8u);
}
}
}

View File

@ -63,8 +63,8 @@ mod m {
mod m {
#[cfg(target_arch = "arm")]
pub mod m {
pub fn align() -> uint { 4u }
pub fn size() -> uint { 12u }
pub fn align() -> uint { 8u }
pub fn size() -> uint { 16u }
}
}