diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-01-04 16:01:17 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-01-04 16:01:17 +0000 |
commit | ee38f85104184b87f78d5bc80e958152d5e01fdf (patch) | |
tree | 821912dc1f01201fbfb9efe55fee4b24bfc51bcf /test/lit.cfg | |
parent | c449a224bb5f7ae223106532be60294376f06630 (diff) |
Include llvm-gcc dir before llvm_tools_dir
This ensures that always the recently compiled tools are picked for testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index b5c5706ad6..7ec23e3545 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -27,6 +27,18 @@ if llvm_obj_root is not None: # 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: + # Include llvm-gcc first, as the llvm-gcc binaryies will not appear + # neither in the tools nor in the scripts dir. However it might be + # possible, that some old llvm tools are in the llvm-gcc dir. Adding + # llvm-gcc dir first ensures, that those will always be overwritten + # by the new tools in llvm_tools_dir. So now outdated tools are used + # for testing + llvmgcc_dir = getattr(config, 'llvmgcc_dir', None) + if llvmgcc_dir: + path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'), + config.environment['PATH'])) + config.environment['PATH'] = path + llvm_src_root = getattr(config, 'llvm_src_root', None) if not llvm_src_root: lit.fatal('No LLVM source root set!') @@ -41,12 +53,6 @@ if llvm_obj_root is not None: path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path - llvmgcc_dir = getattr(config, 'llvmgcc_dir', None) - if llvmgcc_dir: - path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'), - config.environment['PATH'])) - config.environment['PATH'] = path - # Propagate 'HOME' through the environment. if 'HOME' in os.environ: config.environment['HOME'] = os.environ['HOME'] |