diff options
author | Rui Ueyama <ruiu@google.com> | 2013-07-03 09:09:13 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-07-03 09:09:13 +0000 |
commit | 924922235ea531bb07db43e8872c2d623b92ada1 (patch) | |
tree | 92d54584dcd037995640394ad5f1b33c308956af /lld | |
parent | 98341b8d635ef36ac9198ff5714392c728070a73 (diff) | |
download | bcm5719-llvm-924922235ea531bb07db43e8872c2d623b92ada1.tar.gz bcm5719-llvm-924922235ea531bb07db43e8872c2d623b92ada1.zip |
Guard a test that fails on a Release build.
llvm-svn: 185524
Diffstat (limited to 'lld')
-rw-r--r-- | lld/test/layout-error-test.objtxt | 1 | ||||
-rw-r--r-- | lld/test/lit.cfg | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lld/test/layout-error-test.objtxt b/lld/test/layout-error-test.objtxt index d0ae58752b3..aefad6c5126 100644 --- a/lld/test/layout-error-test.objtxt +++ b/lld/test/layout-error-test.objtxt @@ -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 diff --git a/lld/test/lit.cfg b/lld/test/lit.cfg index 63426668422..ef5510caaaf 100644 --- a/lld/test/lit.cfg +++ b/lld/test/lit.cfg @@ -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() |