diff options
| author | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-07-04 05:11:55 +0000 |
|---|---|---|
| committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-07-04 05:11:55 +0000 |
| commit | b52c761a3c80eceed32c50c2da7f6637889e52eb (patch) | |
| tree | 95dde5cf1203cb5ee58c921ba4082a59708b624c | |
| parent | 8d7a173f4b2d94219415f675d52ffee4bf617014 (diff) | |
| download | bcm5719-llvm-b52c761a3c80eceed32c50c2da7f6637889e52eb.tar.gz bcm5719-llvm-b52c761a3c80eceed32c50c2da7f6637889e52eb.zip | |
Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.
This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.
llvm-svn: 212316
| -rw-r--r-- | clang-tools-extra/test/Unit/lit.cfg | 5 | ||||
| -rw-r--r-- | clang-tools-extra/test/Unit/lit.site.cfg.in | 1 | ||||
| -rw-r--r-- | clang/test/Unit/lit.cfg | 5 | ||||
| -rw-r--r-- | llvm/test/Unit/lit.cfg | 5 |
4 files changed, 16 insertions, 0 deletions
diff --git a/clang-tools-extra/test/Unit/lit.cfg b/clang-tools-extra/test/Unit/lit.cfg index eccb5b3289d..2c0760d83b1 100644 --- a/clang-tools-extra/test/Unit/lit.cfg +++ b/clang-tools-extra/test/Unit/lit.cfg @@ -12,6 +12,11 @@ if extra_tools_obj_dir is not None: config.test_source_root = extra_tools_obj_dir config.test_exec_root = config.test_source_root +# Win32 seeks DLLs along %PATH%. +if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): + config.environment['PATH'] = os.path.pathsep.join(( + config.shlibdir, config.environment['PATH'])) + # All GoogleTests are named to have 'Tests' as their suffix. The '.' option is # a special value for GoogleTest indicating that it should look through the # entire testsuite recursively for tests (alternatively, one could provide a diff --git a/clang-tools-extra/test/Unit/lit.site.cfg.in b/clang-tools-extra/test/Unit/lit.site.cfg.in index 781970d66c8..0171efce792 100644 --- a/clang-tools-extra/test/Unit/lit.site.cfg.in +++ b/clang-tools-extra/test/Unit/lit.site.cfg.in @@ -2,6 +2,7 @@ # Do not edit! config.extra_tools_obj_dir = "@CLANG_TOOLS_BINARY_DIR@/unittests" config.extra_tools_src_dir = "@CLANG_TOOLS_SOURCE_DIR@/unittests" +config.shlibdir = "@SHLIBDIR@" config.target_triple = "@TARGET_TRIPLE@" # Make sure any custom vars defined above that are required in lit.local.cfg diff --git a/clang/test/Unit/lit.cfg b/clang/test/Unit/lit.cfg index d34a01c9f9f..4fa6e78ed63 100644 --- a/clang/test/Unit/lit.cfg +++ b/clang/test/Unit/lit.cfg @@ -100,4 +100,9 @@ if not llvm_libs_dir: lit_config.fatal('No LLVM libs dir set!') shlibpath = os.path.pathsep.join((llvm_libs_dir, config.environment.get(shlibpath_var,''))) + +# Win32 seeks DLLs along %PATH%. +if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): + shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath)) + config.environment[shlibpath_var] = shlibpath diff --git a/llvm/test/Unit/lit.cfg b/llvm/test/Unit/lit.cfg index 04e88306881..e481dcc6a7b 100644 --- a/llvm/test/Unit/lit.cfg +++ b/llvm/test/Unit/lit.cfg @@ -35,6 +35,11 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']: if symbolizer in os.environ: config.environment[symbolizer] = os.environ[symbolizer] +# Win32 seeks DLLs along %PATH%. +if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): + config.environment['PATH'] = os.path.pathsep.join(( + config.shlibdir, config.environment['PATH'])) + ### # Check that the object root is known. |

