[PATCH] D39162: [test] Fix clang-test for FreeBSD and NetBSD

Zhihao Yuan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 21 20:51:19 PDT 2017


lichray updated this revision to Diff 119772.
lichray retitled this revision from "[test] Fix clang-test for FreeBSD" to "[test] Fix clang-test for FreeBSD and NetBSD".
lichray edited the summary of this revision.

https://reviews.llvm.org/D39162

Files:
  test/Unit/lit.cfg.py


Index: test/Unit/lit.cfg.py
===================================================================
--- test/Unit/lit.cfg.py
+++ test/Unit/lit.cfg.py
@@ -36,12 +36,14 @@
         config.environment[symbolizer] = os.environ[symbolizer]
 
 shlibpath_var = ''
-if platform.system() == 'Linux':
+if platform.system() in ['Linux', 'FreeBSD', 'NetBSD']:
     shlibpath_var = 'LD_LIBRARY_PATH'
 elif platform.system() == 'Darwin':
     shlibpath_var = 'DYLD_LIBRARY_PATH'
 elif platform.system() == 'Windows':
     shlibpath_var = 'PATH'
+else:
+    raise EnvironmentError('unknown platform.system()')
 
 # in stand-alone builds, shlibdir is clang's build tree
 # while llvm_libs_dir is installed LLVM (and possibly older clang)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39162.119772.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171022/12875f8a/attachment.bin>


More information about the cfe-commits mailing list