summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Moroz <mmoroz@chromium.org>2019-07-09 19:28:14 +0000
committerMax Moroz <mmoroz@chromium.org>2019-07-09 19:28:14 +0000
commit89b1efade55161b3f6e1738c9b89def20b908879 (patch)
treeb7384bf972143577212ddcc961b53ce35c8986d9
parent1a4fc2413fbe789f4b5bbff50c1fcc234fb304ee (diff)
downloadcompiler-rt-89b1efade55161b3f6e1738c9b89def20b908879.tar.gz
[libFuzzer] Include FuzzedDataProvider.h in the test without "utils" subdir.
Summary: 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. Reviewers: morehouse Reviewed By: morehouse Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D64440 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@365544 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/fuzzer/tests/CMakeLists.txt2
-rw-r--r--lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/fuzzer/tests/CMakeLists.txt b/lib/fuzzer/tests/CMakeLists.txt
index 69e67ab0d..6f6651079 100644
--- a/lib/fuzzer/tests/CMakeLists.txt
+++ b/lib/fuzzer/tests/CMakeLists.txt
@@ -75,6 +75,8 @@ if(COMPILER_RT_DEFAULT_TARGET_ARCH IN_LIST FUZZER_SUPPORTED_ARCH)
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}
diff --git a/lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp b/lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
index 69a8aa4cc..e1b272227 100644
--- a/lib/fuzzer/tests/FuzzedDataProviderUnittest.cpp
+++ b/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