about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-12 08:19:35 +0000
committerbors <bors@rust-lang.org>2019-02-12 08:19:35 +0000
commita54b5c7a645ead203d77e78245362f9e0f00dd3c (patch)
tree392e43417405a4a42a3d21aa53f9aeb084972c2b /src/tools
parent75f9159009cd0814bd6b5c3bf6a5406de7c4fe8d (diff)
parentf15d20c1f78c220d0790b13e2af30670053ee0d8 (diff)
Auto merge of #57388 - euclio:runmake-explicit-ignore, r=kennytm
use ignore directives for run-make tests

This makes the tests easier to read, and makes it possible to tell which
tests aren't being run on the host platform.

Fixes #56704.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/compiletest/src/util.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
index 85be2fed075..240287fa248 100644
--- a/src/tools/compiletest/src/util.rs
+++ b/src/tools/compiletest/src/util.rs
@@ -9,6 +9,7 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
     ("androideabi", "android"),
     ("bitrig", "bitrig"),
     ("cloudabi", "cloudabi"),
+    ("cuda", "cuda"),
     ("darwin", "macos"),
     ("dragonfly", "dragonfly"),
     ("emscripten", "emscripten"),
@@ -20,9 +21,11 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
     ("l4re", "l4re"),
     ("linux", "linux"),
     ("mingw32", "windows"),
+    ("none", "none"),
     ("netbsd", "netbsd"),
     ("openbsd", "openbsd"),
     ("redox", "redox"),
+    ("sgx", "sgx"),
     ("solaris", "solaris"),
     ("win32", "windows"),
     ("windows", "windows"),
@@ -38,6 +41,7 @@ const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
     ("armv7", "arm"),
     ("armv7s", "arm"),
     ("asmjs", "asmjs"),
+    ("cuda", "cuda"),
     ("hexagon", "hexagon"),
     ("i386", "x86"),
     ("i586", "x86"),
@@ -154,6 +158,7 @@ fn test_get_arch_failure() {
 fn test_get_arch() {
     assert_eq!("x86_64", get_arch("x86_64-unknown-linux-gnu"));
     assert_eq!("x86_64", get_arch("amd64"));
+    assert_eq!("cuda", get_arch("nvptx64-nvidia-cuda"));
 }
 
 #[test]
@@ -168,4 +173,8 @@ fn test_matches_os() {
     assert!(matches_os("wasm32-unknown-unknown", "emscripten"));
     assert!(matches_os("wasm32-unknown-unknown", "wasm32-bare"));
     assert!(!matches_os("wasm32-unknown-unknown", "windows"));
+    assert!(matches_os("thumbv6m0-none-eabi", "none"));
+    assert!(matches_os("riscv32imc-unknown-none-elf", "none"));
+    assert!(matches_os("nvptx64-nvidia-cuda", "cuda"));
+    assert!(matches_os("x86_64-fortanix-unknown-sgx", "sgx"));
 }