[lld] r185524 - Guard a test that fails on a Release build.

Rui Ueyama ruiu at google.com
Wed Jul 3 02:09:13 PDT 2013


Author: ruiu
Date: Wed Jul  3 04:09:13 2013
New Revision: 185524

URL: http://llvm.org/viewvc/llvm-project?rev=185524&view=rev
Log:
Guard a test that fails on a Release build.

Modified:
    lld/trunk/test/layout-error-test.objtxt
    lld/trunk/test/lit.cfg

Modified: lld/trunk/test/layout-error-test.objtxt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/layout-error-test.objtxt?rev=185524&r1=185523&r2=185524&view=diff
==============================================================================
--- lld/trunk/test/layout-error-test.objtxt (original)
+++ lld/trunk/test/layout-error-test.objtxt Wed Jul  3 04:09:13 2013
@@ -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
 

Modified: lld/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=185524&r1=185523&r2=185524&view=diff
==============================================================================
--- lld/trunk/test/lit.cfg (original)
+++ lld/trunk/test/lit.cfg Wed Jul  3 04:09:13 2013
@@ -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()





More information about the llvm-commits mailing list