# These tests are not instrumented with coverage,
# but have coverage rt in the binary.

set(CMAKE_CXX_FLAGS
  "${LIBFUZZER_FLAGS_BASE} -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters,trace-pc-guard")

set(NoCoverageTests
  UninstrumentedTest
  )

foreach(Test ${NoCoverageTests})
  add_libfuzzer_test(${Test}-NoCoverage SOURCES ../${Test}.cpp)
endforeach()


###############################################################################
# AFL Driver test
###############################################################################

add_executable(AFLDriverTest
  ../AFLDriverTest.cpp ../../afl/afl_driver.cpp)

set_target_properties(AFLDriverTest
    PROPERTIES RUNTIME_OUTPUT_DIRECTORY
    "${CMAKE_BINARY_DIR}/lib/Fuzzer/test"
    )

# Propagate value into parent directory
set(TestBinaries ${TestBinaries} AFLDriverTest PARENT_SCOPE)

# These tests are not instrumented with coverage,
# but have coverage rt in the binary.

set(CMAKE_CXX_FLAGS
  "${LIBFUZZER_FLAGS_BASE} -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters,trace-pc-guard")

set(NoCoverageTests
  UninstrumentedTest
  )

foreach(Test ${NoCoverageTests})
  add_libfuzzer_test(${Test}-NoCoverage SOURCES ../${Test}.cpp)
endforeach()


###############################################################################
# AFL Driver test
###############################################################################
if(NOT MSVC)
  add_executable(AFLDriverTest
    ../AFLDriverTest.cpp ../../afl/afl_driver.cpp)

  set_target_properties(AFLDriverTest
      PROPERTIES RUNTIME_OUTPUT_DIRECTORY
      "${CMAKE_BINARY_DIR}/lib/Fuzzer/test"
      )

  # Propagate value into parent directory
  set(TestBinaries ${TestBinaries} AFLDriverTest PARENT_SCOPE)
endif()

Disable afl tests for Windows.
[libFuzzer] Disable afl tests for Windows.

On Windows, we don't have interoperability between libFuzzer and afl.

Differential Revision: https://reviews.llvm.org/D28355

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@292734 91177308-0d34-0410-b5e6-96231b3b80d8
