parent
53db981148
commit
1240197a5b
@ -37,7 +37,7 @@ macro_rules! iotest (
|
|||||||
use io::net::unix::*;
|
use io::net::unix::*;
|
||||||
use io::timer::*;
|
use io::timer::*;
|
||||||
use io::process::*;
|
use io::process::*;
|
||||||
use unstable::running_on_valgrind;
|
use rt::running_on_valgrind;
|
||||||
use str;
|
use str;
|
||||||
|
|
||||||
fn f() $b
|
fn f() $b
|
||||||
|
@ -76,6 +76,10 @@ pub use self::util::{Stdio, Stdout, Stderr};
|
|||||||
|
|
||||||
pub use alloc::{heap, libc_heap};
|
pub use alloc::{heap, libc_heap};
|
||||||
|
|
||||||
|
// Used by I/O tests
|
||||||
|
#[experimental]
|
||||||
|
pub use self::util::running_on_valgrind;
|
||||||
|
|
||||||
// FIXME: these probably shouldn't be public...
|
// FIXME: these probably shouldn't be public...
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub mod shouldnt_be_public {
|
pub mod shouldnt_be_public {
|
||||||
|
@ -15,11 +15,11 @@ use io::IoResult;
|
|||||||
use io;
|
use io;
|
||||||
use iter::Iterator;
|
use iter::Iterator;
|
||||||
use libc;
|
use libc;
|
||||||
|
use libc::uintptr_t;
|
||||||
use option::{Some, None, Option};
|
use option::{Some, None, Option};
|
||||||
use os;
|
use os;
|
||||||
use result::Ok;
|
use result::Ok;
|
||||||
use str::{Str, StrSlice};
|
use str::{Str, StrSlice};
|
||||||
use unstable::running_on_valgrind;
|
|
||||||
use slice::ImmutableVector;
|
use slice::ImmutableVector;
|
||||||
|
|
||||||
// Indicates whether we should perform expensive sanity checks, including rtassert!
|
// Indicates whether we should perform expensive sanity checks, including rtassert!
|
||||||
@ -162,3 +162,15 @@ memory and partly incapable of presentation to others.",
|
|||||||
unsafe { intrinsics::abort() }
|
unsafe { intrinsics::abort() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Dynamically inquire about whether we're running under V.
|
||||||
|
/// You should usually not use this unless your test definitely
|
||||||
|
/// can't run correctly un-altered. Valgrind is there to help
|
||||||
|
/// you notice weirdness in normal, un-doctored code paths!
|
||||||
|
pub fn running_on_valgrind() -> bool {
|
||||||
|
unsafe { rust_running_on_valgrind() != 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
extern {
|
||||||
|
fn rust_running_on_valgrind() -> uintptr_t;
|
||||||
|
}
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
#![doc(hidden)]
|
#![doc(hidden)]
|
||||||
|
|
||||||
use libc::uintptr_t;
|
|
||||||
|
|
||||||
pub use core::finally;
|
pub use core::finally;
|
||||||
|
|
||||||
pub mod dynamic_lib;
|
pub mod dynamic_lib;
|
||||||
@ -20,14 +18,3 @@ pub mod simd;
|
|||||||
pub mod sync;
|
pub mod sync;
|
||||||
pub mod mutex;
|
pub mod mutex;
|
||||||
|
|
||||||
/// Dynamically inquire about whether we're running under V.
|
|
||||||
/// You should usually not use this unless your test definitely
|
|
||||||
/// can't run correctly un-altered. Valgrind is there to help
|
|
||||||
/// you notice weirdness in normal, un-doctored code paths!
|
|
||||||
pub fn running_on_valgrind() -> bool {
|
|
||||||
unsafe { rust_running_on_valgrind() != 0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
extern {
|
|
||||||
fn rust_running_on_valgrind() -> uintptr_t;
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user