summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite
diff options
context:
space:
mode:
authorJeremy Koritzinsky <jekoritz@microsoft.com>2019-05-10 16:24:42 -0700
committerGitHub <noreply@github.com>2019-05-10 16:24:42 -0700
commite985b20260631c98a09f08cb67e93d690a6ffd0b (patch)
treef78350febda1071e413382c879726f111bd62c36 /src/pal/tests/palsuite
parent0dd7c86c8573f257cfd3b4b6374b7415fd3a9131 (diff)
downloadcoreclr-e985b20260631c98a09f08cb67e93d690a6ffd0b.tar.gz
coreclr-e985b20260631c98a09f08cb67e93d690a6ffd0b.tar.bz2
coreclr-e985b20260631c98a09f08cb67e93d690a6ffd0b.zip
Move EventProvider native layout to be driven by CMake configure (#24478)
* Generate eventpipe implementation as part of CMake configure. * Generate Etw provider as part of CMake configure. * First pass porting over lttng provider to cmake. * Fix up CMake Lttng provider generation. * Move Lttng provider into CMake tree. * Move dummy event provider to CMake * Move genEventing into the CMake tree. * Remove extraneous logging and unused python locator. * Clean up build.sh * Clean up genEventingTests.py * Add dependencies to enable more incremental builds (providers not fully incremental). * Convert to custom command and targets instead of at configure time. * Get each eventing target to incrementally build. * Fix incremental builds * Add missing dependencies on eventing headers. * PR Feedback. Mark all generated files as generated * Clean up eventprovider test CMakeLists
Diffstat (limited to 'src/pal/tests/palsuite')
-rw-r--r--src/pal/tests/palsuite/CMakeLists.txt2
-rw-r--r--src/pal/tests/palsuite/eventprovider/CMakeLists.txt41
2 files changed, 42 insertions, 1 deletions
diff --git a/src/pal/tests/palsuite/CMakeLists.txt b/src/pal/tests/palsuite/CMakeLists.txt
index 38b8ed0459..6726165caf 100644
--- a/src/pal/tests/palsuite/CMakeLists.txt
+++ b/src/pal/tests/palsuite/CMakeLists.txt
@@ -40,5 +40,5 @@ add_subdirectory(samples)
add_subdirectory(threading)
if(FEATURE_EVENT_TRACE)
- add_subdirectory(${GENERATED_EVENTING_DIR}/eventprovider/tests ${CMAKE_CURRENT_BINARY_DIR}/eventprovider)
+ add_subdirectory(eventprovider)
endif(FEATURE_EVENT_TRACE)
diff --git a/src/pal/tests/palsuite/eventprovider/CMakeLists.txt b/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
new file mode 100644
index 0000000000..f74fc9b604
--- /dev/null
+++ b/src/pal/tests/palsuite/eventprovider/CMakeLists.txt
@@ -0,0 +1,41 @@
+cmake_minimum_required(VERSION 2.8.12.2)
+
+set(SOURCES
+ ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp
+)
+
+set(EVENT_MANIFEST ${VM_DIR}/ClrEtwAll.man)
+set(TEST_GENERATOR ${CLR_DIR}/src/scripts/genEventingTests.py)
+
+include(FindPythonInterp)
+
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clralltestevents.cpp
+ COMMAND ${PYTHON_EXECUTABLE} ${TEST_GENERATOR} --testdir "${CMAKE_CURRENT_BINARY_DIR}" --man "${EVENT_MANIFEST}"
+ DEPENDS ${EVENT_MANIFEST} ${TEST_GENERATOR}
+ COMMENT "Updating clralltestevents.cpp"
+)
+
+include_directories(${GENERATED_INCLUDE_DIR})
+
+if(FEATURE_PAL)
+ include_directories(${COREPAL_SOURCE_DIR}/inc/rt)
+endif(FEATURE_PAL)
+
+add_executable(eventprovidertest
+ ${SOURCES}
+ )
+set(EVENT_PROVIDER_DEPENDENCIES "")
+if(FEATURE_EVENT_TRACE)
+ add_definitions(-DFEATURE_EVENT_TRACE=1)
+ list(APPEND EVENT_PROVIDER_DEPENDENCIES
+ eventprovider
+ )
+ if(CLR_CMAKE_PLATFORM_LINUX)
+ list(APPEND EVENT_PROVIDER_DEPENDENCIES
+ coreclrtraceptprovider
+ )
+ endif(CLR_CMAKE_PLATFORM_LINUX)
+endif(FEATURE_EVENT_TRACE)
+
+target_link_libraries(eventprovidertest ${EVENT_PROVIDER_DEPENDENCIES} coreclrpal)
+add_dependencies(eventprovidertest eventing_headers)