[llvm] r293827 - [libFuzzer] Add features `windows` and `posix` for lit tests.
Robinson, Paul via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 15:50:31 PST 2017
Isn't there already a 'system-windows' for windows-hosted stuff?
You shouldn't need to invent a new one.
--paulr
> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf
> Of Marcos Pividori via llvm-commits
> Sent: Wednesday, February 01, 2017 2:41 PM
> To: llvm-commits at lists.llvm.org
> Subject: [llvm] r293827 - [libFuzzer] Add features `windows` and `posix`
> for lit tests.
>
> Author: mpividori
> Date: Wed Feb 1 16:40:34 2017
> New Revision: 293827
>
> URL: http://llvm.org/viewvc/llvm-project?rev=293827&view=rev
> Log:
> [libFuzzer] Add features `windows` and `posix` for lit tests.
>
> Add 2 features: posix and windows.
> Sometimes we want some specific tests only for posix and we use:
> REQUIRES: posix
> Sometimes we want some specific tests only for windows and we use:
> REQUIRES: windows
>
> Differential Revision: https://reviews.llvm.org/D29418
>
> Modified:
> llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
> llvm/trunk/lib/Fuzzer/test/lit.cfg
> llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
>
> Modified: llvm/trunk/lib/Fuzzer/test/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Fuzzer/test/CMakeLists.txt?rev=293827&r1=293826&r2=
> 293827&view=diff
> ==========================================================================
> ====
> --- llvm/trunk/lib/Fuzzer/test/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Fuzzer/test/CMakeLists.txt Wed Feb 1 16:40:34 2017
> @@ -226,6 +226,10 @@ set(TestBinaries ${TestBinaries} LLVMFuz
> # 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
>
> Modified: llvm/trunk/lib/Fuzzer/test/lit.cfg
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Fuzzer/test/lit.cfg?rev=293827&r1=293826&r2=293827&
> view=diff
> ==========================================================================
> ====
> --- llvm/trunk/lib/Fuzzer/test/lit.cfg (original)
> +++ llvm/trunk/lib/Fuzzer/test/lit.cfg Wed Feb 1 16:40:34 2017
> @@ -20,6 +20,12 @@ if config.has_lsan:
> 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()``.
>
> Modified: llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in?rev=293827&r1=293826&r2
> =293827&view=diff
> ==========================================================================
> ====
> --- llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in (original)
> +++ llvm/trunk/lib/Fuzzer/test/lit.site.cfg.in Wed Feb 1 16:40:34 2017
> @@ -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")
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list