about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-20 17:45:15 +0000
committerbors <bors@rust-lang.org>2015-03-20 17:45:15 +0000
commit3900c089a1305f06c6dbb15d07127b4e3a8f040c (patch)
treef30cfb67ceaf403565f320ffc1008c104e749942
parentecdf792d1dda479d04781e5750737aa6cc574119 (diff)
parent0ed265e63b130a52255031f593786bebdbc7f28d (diff)
downloadrust-3900c089a1305f06c6dbb15d07127b4e3a8f040c.tar.gz
rust-3900c089a1305f06c6dbb15d07127b4e3a8f040c.zip
Auto merge of #23471 - sae-bom:aarch64-linux-android, r=alexcrichton
Resolved #21773. (Aarch64 test has been broken again)
r? @alexcrichton 
-rw-r--r--src/compiletest/header.rs4
-rw-r--r--src/compiletest/util.rs25
-rw-r--r--src/test/run-pass/foreign-call-no-runtime.rs2
-rw-r--r--src/test/run-pass/issue-13304.rs2
-rw-r--r--src/test/run-pass/issue-16272.rs2
-rw-r--r--src/test/run-pass/issue-20091.rs2
-rw-r--r--src/test/run-pass/process-spawn-with-unicode-params.rs2
7 files changed, 39 insertions, 0 deletions
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs
index 6899fa13974..29123173f5b 100644
--- a/src/compiletest/header.rs
+++ b/src/compiletest/header.rs
@@ -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())
@@ -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")) &&
diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs
index 16e2806f72c..2e11cf47d1e 100644
--- a/src/compiletest/util.rs
+++ b/src/compiletest/util.rs
@@ -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) {
@@ -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));
diff --git a/src/test/run-pass/foreign-call-no-runtime.rs b/src/test/run-pass/foreign-call-no-runtime.rs
index 3f226a1985e..9e05f38af7a 100644
--- a/src/test/run-pass/foreign-call-no-runtime.rs
+++ b/src/test/run-pass/foreign-call-no-runtime.rs
@@ -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;
diff --git a/src/test/run-pass/issue-13304.rs b/src/test/run-pass/issue-13304.rs
index f1c747eca68..bd2ddc6b9b2 100644
--- a/src/test/run-pass/issue-13304.rs
+++ b/src/test/run-pass/issue-13304.rs
@@ -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;
diff --git a/src/test/run-pass/issue-16272.rs b/src/test/run-pass/issue-16272.rs
index 92d8dfa2cf9..9562d113ada 100644
--- a/src/test/run-pass/issue-16272.rs
+++ b/src/test/run-pass/issue-16272.rs
@@ -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;
 
diff --git a/src/test/run-pass/issue-20091.rs b/src/test/run-pass/issue-20091.rs
index ba107dd2cf9..fe9ae022d88 100644
--- a/src/test/run-pass/issue-20091.rs
+++ b/src/test/run-pass/issue-20091.rs
@@ -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;
diff --git a/src/test/run-pass/process-spawn-with-unicode-params.rs b/src/test/run-pass/process-spawn-with-unicode-params.rs
index 3e5f84fa26f..466b38e8742 100644
--- a/src/test/run-pass/process-spawn-with-unicode-params.rs
+++ b/src/test/run-pass/process-spawn-with-unicode-params.rs
@@ -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;