From 1001b2beee595db76ae9d612134271e4a971fed8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 6 Aug 2018 18:45:15 +0200 Subject: [PATCH] inore some codegen tests when debug assertions are enabled --- .travis.yml | 2 ++ src/test/codegen/vec-clear.rs | 1 + src/test/codegen/vec-iter-collect-len.rs | 1 + src/test/codegen/vec-optimizes-away.rs | 1 + src/tools/compiletest/src/header.rs | 6 ++++-- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0228fdc994dd..16e55ca23486 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,8 @@ matrix: # slow to run. # OSX builders running tests, these run the full test suite. + # NO_DEBUG_ASSERTIONS=1 to make them go faster, but also do have some + # runners that run `//ignore-debug` tests. # # Note that the compiler is compiled to target 10.8 here because the Xcode # version that we're using, 8.2, cannot compile LLVM for OSX 10.7. diff --git a/src/test/codegen/vec-clear.rs b/src/test/codegen/vec-clear.rs index a73dd077cea1..c44637376d7a 100644 --- a/src/test/codegen/vec-clear.rs +++ b/src/test/codegen/vec-clear.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-debug: the debug assertions get in the way // compile-flags: -O #![crate_type = "lib"] diff --git a/src/test/codegen/vec-iter-collect-len.rs b/src/test/codegen/vec-iter-collect-len.rs index efb384d0afbc..05cbf0534441 100644 --- a/src/test/codegen/vec-iter-collect-len.rs +++ b/src/test/codegen/vec-iter-collect-len.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-debug: the debug assertions get in the way // no-system-llvm // compile-flags: -O #![crate_type="lib"] diff --git a/src/test/codegen/vec-optimizes-away.rs b/src/test/codegen/vec-optimizes-away.rs index 261564ed51ae..6bef01fd4ea2 100644 --- a/src/test/codegen/vec-optimizes-away.rs +++ b/src/test/codegen/vec-optimizes-away.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. // +// ignore-debug: the debug assertions get in the way // no-system-llvm // compile-flags: -O #![crate_type="lib"] diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 5f68d00eab1d..3fd67366a8ca 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -615,12 +615,14 @@ impl Config { common::DebugInfoLldb => name == "lldb", common::Pretty => name == "pretty", _ => false, - } || (self.target != self.host && name == "cross-compile") || + } || + (self.target != self.host && name == "cross-compile") || match self.compare_mode { Some(CompareMode::Nll) => name == "compare-mode-nll", Some(CompareMode::Polonius) => name == "compare-mode-polonius", None => false, - } + } || + (cfg!(debug_assertions) && name == "debug") } else { false }