[polly] r176900 - tests: Properly check if asserts are available

Tobias Grosser grosser at fim.uni-passau.de
Tue Mar 12 14:27:39 PDT 2013


Author: grosser
Date: Tue Mar 12 16:27:39 2013
New Revision: 176900

URL: http://llvm.org/viewvc/llvm-project?rev=176900&view=rev
Log:
tests: Properly check if asserts are available

In my previous commits I failed to realise that my new requires lines fully
disabled these tests. We now properly check if we are in an asserts build and
only disable the tests if assertions are not available.

Reported-by: Sean Silva <silvas at purdue.edu>

Modified:
    polly/trunk/test/Cloog/CodeGen/MemAccess/simple.ll
    polly/trunk/test/ScopInfo/Alias-0.ll
    polly/trunk/test/ScopInfo/Alias-1.ll
    polly/trunk/test/ScopInfo/Alias-2.ll
    polly/trunk/test/ScopInfo/Alias-3.ll
    polly/trunk/test/lit.cfg

Modified: polly/trunk/test/Cloog/CodeGen/MemAccess/simple.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Cloog/CodeGen/MemAccess/simple.ll?rev=176900&r1=176899&r2=176900&view=diff
==============================================================================
--- polly/trunk/test/Cloog/CodeGen/MemAccess/simple.ll (original)
+++ polly/trunk/test/Cloog/CodeGen/MemAccess/simple.ll Tue Mar 12 16:27:39 2013
@@ -1,5 +1,5 @@
 ;RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-dir=%S -polly-import-jscop-postfix=transformed -stats < %s 2>&1  | FileCheck %s
-; REQUIRES: assert
+; REQUIRES: asserts
 
 ;int A[100];
 ;int B[100];

Modified: polly/trunk/test/ScopInfo/Alias-0.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/Alias-0.ll?rev=176900&r1=176899&r2=176900&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/Alias-0.ll (original)
+++ polly/trunk/test/ScopInfo/Alias-0.ll Tue Mar 12 16:27:39 2013
@@ -1,5 +1,5 @@
 ; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze < %s -stats 2>&1 | FileCheck %s
-; REQUIRES: assert
+; REQUIRES: asserts
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-linux-gnu"

Modified: polly/trunk/test/ScopInfo/Alias-1.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/Alias-1.ll?rev=176900&r1=176899&r2=176900&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/Alias-1.ll (original)
+++ polly/trunk/test/ScopInfo/Alias-1.ll Tue Mar 12 16:27:39 2013
@@ -1,5 +1,5 @@
 ; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze < %s -stats 2>&1 | FileCheck %s
-; REQUIRES: assert
+; REQUIRES: asserts
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-linux-gnu"

Modified: polly/trunk/test/ScopInfo/Alias-2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/Alias-2.ll?rev=176900&r1=176899&r2=176900&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/Alias-2.ll (original)
+++ polly/trunk/test/ScopInfo/Alias-2.ll Tue Mar 12 16:27:39 2013
@@ -1,5 +1,5 @@
 ; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze < %s -stats 2>&1 | FileCheck %s
-; REQUIRES: assert
+; REQUIRES: asserts
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-linux-gnu"

Modified: polly/trunk/test/ScopInfo/Alias-3.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/Alias-3.ll?rev=176900&r1=176899&r2=176900&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/Alias-3.ll (original)
+++ polly/trunk/test/ScopInfo/Alias-3.ll Tue Mar 12 16:27:39 2013
@@ -1,5 +1,5 @@
 ; RUN: opt %loadPolly %defaultOpts -polly-analyze-ir -analyze < %s -stats 2>&1 | FileCheck %s
-; REQUIRES: assert
+; REQUIRES: asserts
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-linux-gnu"

Modified: polly/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.cfg?rev=176900&r1=176899&r2=176900&view=diff
==============================================================================
--- polly/trunk/test/lit.cfg (original)
+++ polly/trunk/test/lit.cfg Tue Mar 12 16:27:39 2013
@@ -2,6 +2,7 @@
 
 import os
 import platform
+import re
 
 # Configuration file for the 'lit' test runner.
 
@@ -95,3 +96,15 @@ if config.test_exec_root is None:
     lit.load_config(config, site_cfg)
     raise SystemExit
 
+# llc knows whether he 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