about summary refs log tree commit diff homepage
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorMartin Nowack <martin@se.inf.tu-dresden.de>2014-02-07 21:19:36 +0100
committerMartin Nowack <martin@se.inf.tu-dresden.de>2014-04-14 10:34:54 +0200
commit0ca3661a57c4b5a091b626455f69d6d087c7c6dc (patch)
treef9c66a5632ac07c9ab14a04ba5265f28c203fa58 /test/lit.cfg
parent347795c5d2dbc2815d395e60a08ad3debca68102 (diff)
downloadklee-0ca3661a57c4b5a091b626455f69d6d087c7c6dc.tar.gz
Update to new lit configuration to support changes in LLVM3.4
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg19
1 files changed, 17 insertions, 2 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 23696138..3d00da53 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -3,6 +3,15 @@
 # Configuration file for the 'lit' test runner.
 
 import os
+import sys
+import re
+import platform
+
+try:
+   import lit.util
+   import lit.formats
+except ImportError:
+   pass
 
 # name: The name of this test suite.
 config.name = 'KLEE'
@@ -66,8 +75,14 @@ for name in subs:
 
 # Get KLEE and Kleaver specific parameters passed on llvm-lit cmd line
 # e.g. llvm-lit --param klee_opts=--help
-klee_extra_params = lit.params.get('klee_opts',"")
-kleaver_extra_params = lit.params.get('kleaver_opts',"")
+try:
+  lit.params
+except AttributeError:
+  klee_extra_params = lit_config.params.get('klee_opts',"")
+  kleaver_extra_params = lit_config.params.get('kleaver_opts',"")
+else:
+  klee_extra_params = lit.params.get('klee_opts',"")
+  kleaver_extra_params = lit.params.get('kleaver_opts',"")
 
 if len(klee_extra_params) != 0:
     print("Passing extra KLEE command line args: {0}".format(klee_extra_params))