Skip to content

Ignore some tests on aarch64 to pass the run-pass test on aarch64-linux-android #23471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/compiletest/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
fn ignore_target(config: &Config) -> String {
format!("ignore-{}", util::get_os(&config.target))
}
fn ignore_architecture(config: &Config) -> String {
format!("ignore-{}", util::get_arch(&config.target))
}
fn ignore_stage(config: &Config) -> String {
format!("ignore-{}",
config.stage_id.split('-').next().unwrap())
Expand Down Expand Up @@ -226,6 +229,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
let val = iter_header(testfile, &mut |ln| {
!parse_name_directive(ln, "ignore-test") &&
!parse_name_directive(ln, &ignore_target(config)) &&
!parse_name_directive(ln, &ignore_architecture(config)) &&
!parse_name_directive(ln, &ignore_stage(config)) &&
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
Expand Down
25 changes: 25 additions & 0 deletions src/compiletest/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
("openbsd", "openbsd"),
];

const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
("i386", "x86"),
("i686", "x86"),
("amd64", "x86_64"),
("x86_64", "x86_64"),
("sparc", "sparc"),
("powerpc", "powerpc"),
("arm64", "aarch64"),
("arm", "arm"),
("aarch64", "aarch64"),
("mips", "mips"),
("xcore", "xcore"),
("msp430", "msp430"),
("hexagon", "hexagon"),
("s390x", "systemz"),
];

pub fn get_os(triple: &str) -> &'static str {
for &(triple_os, os) in OS_TABLE {
if triple.contains(triple_os) {
Expand All @@ -33,6 +50,14 @@ pub fn get_os(triple: &str) -> &'static str {
}
panic!("Cannot determine OS from triple");
}
pub fn get_arch(triple: &str) -> &'static str {
for &(triple_arch, arch) in ARCH_TABLE {
if triple.contains(triple_arch) {
return arch
}
}
panic!("Cannot determine Architecture from triple");
}

pub fn make_new_path(path: &str) -> String {
assert!(cfg!(windows));
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/foreign-call-no-runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-aarch64

extern crate libc;

use std::mem;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-13304.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-aarch64

use std::env;
use std::io::prelude::*;
use std::io;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-16272.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-aarch64

use std::process::Command;
use std::env;

Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/issue-20091.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-aarch64

#[cfg(unix)]
fn main() {
use std::process::Command;
Expand Down
2 changes: 2 additions & 0 deletions src/test/run-pass/process-spawn-with-unicode-params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// non-ASCII characters. The child process ensures all the strings are
// intact.

// ignore-aarch64

use std::io::prelude::*;
use std::io;
use std::fs;
Expand Down