summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-08 09:08:00 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-08 09:08:00 +0000
commit5ed7be1a401d7f75e08623b0172f0318f2977e31 (patch)
tree200261169fef237f7606b4bd9869227339ea8cc7 /test/lit.cfg
parentfb4fb6ddb0f26ad0269a93f2edc8baa490984122 (diff)
downloadllvm-5ed7be1a401d7f75e08623b0172f0318f2977e31.tar.gz
llvm-5ed7be1a401d7f75e08623b0172f0318f2977e31.tar.bz2
llvm-5ed7be1a401d7f75e08623b0172f0318f2977e31.tar.xz
Derive the right paths to use during testing instead of passing it in via make.
Also, fix a few other details of the cmake test target and rename it to 'check'. CMake tests now work for the most part, but there are a handful of failures left due to missing site.exp bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 1965615ae8..1939792327 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -22,6 +22,31 @@ llvm_obj_root = getattr(config, 'llvm_obj_root', None)
if llvm_obj_root is not None:
config.test_exec_root = os.path.join(llvm_obj_root, 'test')
+# Tweak the PATH to include the scripts dir, the tools dir, and the llvm-gcc bin
+# dir (if available).
+if llvm_obj_root is not None:
+ llvm_src_root = getattr(config, 'llvm_src_root', None)
+ if not llvm_src_root:
+ lit.fatal('No LLVM source root set!')
+ path = os.path.pathsep.join((os.path.join(llvm_src_root, 'test',
+ 'Scripts'),
+ config.environment['PATH']))
+ config.environment['PATH'] = path
+
+ llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+ if not llvm_tools_dir:
+ lit.fatal('No LLVM tools dir set!')
+ path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
+ config.environment['PATH'] = path
+
+ llvmgcc_dir = getattr(config, 'llvmgcc_dir', None)
+ if not llvm_tools_dir:
+ lit.fatal('No llvm-gcc dir set!')
+ if llvmgcc_dir:
+ path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'),
+ config.environment['PATH']))
+ config.environment['PATH'] = path
+
###
import os