[PATCH] D29418: [libFuzzer] Add features `windows` and `posix` for lit tests.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 14:51:56 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL293827: [libFuzzer] Add features `windows` and `posix` for lit tests. (authored by mpividori).

Changed prior to commit:
  https://reviews.llvm.org/D29418?vs=86704&id=86727#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29418

Files:
  llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
  llvm/trunk/lib/Fuzzer/test/lit.cfg
  llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in


Index: llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
===================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
+++ llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
@@ -1,4 +1,5 @@
 config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.has_lsan = True if @HAS_LSAN@ == 1 else False
+config.is_posix = @LIBFUZZER_POSIX@
 lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
Index: llvm/trunk/lib/Fuzzer/test/lit.cfg
===================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.cfg
+++ llvm/trunk/lib/Fuzzer/test/lit.cfg
@@ -20,6 +20,12 @@
 else:
   lit_config.note('lsan feature unavailable')
 
+if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):
+  config.available_features.add('windows')
+
+if config.is_posix:
+  config.available_features.add('posix')
+
 if sys.platform.startswith('linux'):
   # Note the value of ``sys.platform`` is not consistent
   # between python 2 and 3, hence the use of ``.startswith()``.
Index: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
===================================================================
--- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
+++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
@@ -226,6 +226,10 @@
 # Note this is done after declaring all tests so we can inform lit if any tests
 # need to be disabled.
 ###############################################################################
+set(LIBFUZZER_POSIX 1)
+if (MSVC)
+  set(LIBFUZZER_POSIX 0)
+endif()
 
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29418.86727.patch
Type: text/x-patch
Size: 1655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170201/6b970401/attachment.bin>


More information about the llvm-commits mailing list