[PATCH] D64440: [libFuzzer] Include FuzzedDataProvider.h in the test without "utils" subdir.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 12:20:16 PDT 2019
Dor1s created this revision.
Dor1s added a reviewer: morehouse.
Herald added subscribers: llvm-commits, Sanitizers, delcypher, mgorny.
Herald added projects: LLVM, Sanitizers.
This way the test would better match the intended usage of the header,
plus it makes some additional testing (e.g. in CI) a bit easier to set up.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D64440
Files:
lib/fuzzer/tests/CMakeLists.txt
lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
Index: lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
===================================================================
--- lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
+++ lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
@@ -6,7 +6,7 @@
#include <cstdint>
#include <cstdlib>
-#include "utils/FuzzedDataProvider.h"
+#include "FuzzedDataProvider.h"
// The test is intentionally extensive, as behavior of |FuzzedDataProvider| must
// not be broken, given than many fuzz targets depend on it. Changing the
Index: lib/fuzzer/tests/CMakeLists.txt
===================================================================
--- lib/fuzzer/tests/CMakeLists.txt
+++ lib/fuzzer/tests/CMakeLists.txt
@@ -75,6 +75,8 @@
set_target_properties(FuzzerUnitTests PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ list(APPEND LIBFUZZER_UNITTEST_CFLAGS -I${COMPILER_RT_SOURCE_DIR}/lib/fuzzer/utils)
+
set(FuzzedDataProviderTestObjects)
generate_compiler_rt_tests(FuzzedDataProviderTestObjects
FuzzedDataProviderUnitTests "FuzzerUtils-${arch}-Test" ${arch}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64440.208775.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190709/76b0ac45/attachment.bin>
More information about the llvm-commits
mailing list