Fix test suite for DragonFly

This commit is contained in:
Michael Neumann 2014-07-31 02:23:35 +02:00
parent e99fc20f95
commit 284ffc5b82
7 changed files with 13 additions and 0 deletions

View File

@ -834,6 +834,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
#[cfg(target_os = "linux")]
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "dragonfly")]
fn prefix_matches( line : &str, prefix : &str ) -> bool {
line.starts_with( prefix )
}
@ -1237,6 +1238,7 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
#[cfg(target_os = "linux")]
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "dragonfly")]
fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
format!("{} {}", prog, args.connect(" "))
}

View File

@ -21,6 +21,7 @@ static OS_TABLE: &'static [(&'static str, &'static str)] = &[
("android", "android"),
("linux", "linux"),
("freebsd", "freebsd"),
("dragonfly", "dragonfly"),
];
pub fn get_os(triple: &str) -> &'static str {

View File

@ -23,6 +23,9 @@ mod hello;
#[cfg(target_os = "freebsd")]
mod hello;
#[cfg(target_os = "dragonfly")]
mod hello;
#[cfg(target_os = "android")]
mod hello;

View File

@ -20,6 +20,7 @@ mod rusti {
#[cfg(target_os = "linux")]
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "dragonfly")]
mod m {
#[main]
#[cfg(target_arch = "x86")]

View File

@ -28,6 +28,10 @@ extern {}
#[link(name = "execinfo")]
extern {}
#[cfg(target_os = "dragonfly")]
#[link(name = "c")]
extern {}
#[cfg(target_os = "macos")]
#[link(name = "System")]
extern {}

View File

@ -39,6 +39,7 @@ struct Outer {
#[cfg(target_os = "linux")]
#[cfg(target_os = "macos")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "dragonfly")]
mod m {
#[cfg(target_arch = "x86")]
pub mod m {

View File

@ -33,5 +33,6 @@ pub fn main() {
#[cfg(target_os = "macos")]
#[cfg(target_os = "linux")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "dragonfly")]
#[cfg(target_os = "android")]
pub fn main() { }