[clang-tools-extra] r212316 - Let test/Unit/lit.cfg add config.shlibdir to $PATH on DLL platforms like cygming.

NAKAMURA Takumi geek4civic at gmail.com
Thu Jul 3 22:11:55 PDT 2014


Author: chapuni
Date: Fri Jul  4 00:11:55 2014
New Revision: 212316

URL: http://llvm.org/viewvc/llvm-project?rev=212316&view=rev
Log:
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.

Modified:
    clang-tools-extra/trunk/test/Unit/lit.cfg
    clang-tools-extra/trunk/test/Unit/lit.site.cfg.in

Modified: clang-tools-extra/trunk/test/Unit/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/Unit/lit.cfg?rev=212316&r1=212315&r2=212316&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/Unit/lit.cfg (original)
+++ clang-tools-extra/trunk/test/Unit/lit.cfg Fri Jul  4 00:11:55 2014
@@ -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

Modified: clang-tools-extra/trunk/test/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/Unit/lit.site.cfg.in?rev=212316&r1=212315&r2=212316&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/Unit/lit.site.cfg.in (original)
+++ clang-tools-extra/trunk/test/Unit/lit.site.cfg.in Fri Jul  4 00:11:55 2014
@@ -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





More information about the cfe-commits mailing list