Guard a test that fails on a Release build.

llvm-svn: 185524
This commit is contained in:
Rui Ueyama 2013-07-03 09:09:13 +00:00
parent 98341b8d63
commit 924922235e
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,4 @@
# REQUIRES: asserts
# RUN: lld -core --add-pass layout -mllvm -debug-only=LayoutPass %s 2>&1 \
# RUN: | FileCheck %s -check-prefix=CHECK

View File

@ -116,3 +116,16 @@ if lit.useValgrind:
# Shell execution
if platform.system() not in ['Windows'] or lit.getBashPath() != '':
config.available_features.add('shell')
# llc knows whether it is compiled with -DNDEBUG.
import subprocess
try:
llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
stdout = subprocess.PIPE)
except OSError, why:
print "Could not find llc in " + llvm_tools_dir
exit(42)
if re.search(r'with assertions', llc_cmd.stdout.read()):
config.available_features.add('asserts')
llc_cmd.wait()