auto merge of #7128 : yichoi/rust/fix_sometc, r=brson

- Fix stat struct for Android (found by SEGV at run-pass/stat.rs)
- Adjust some test cases to rpass for Android 
- Modify some script to rpass for Android
This commit is contained in:
bors 2013-06-20 11:35:34 -07:00
commit f348465283
7 changed files with 92 additions and 11 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 }
}
}