9a0c84efa6
* Fix find_package(rocprofiler) in build tree * Move include/rocprofiler to include/rocprofiler-sdk * Update include/CMakeLists.txt - add_subdirectory(rocprofiler-sdk) * Move lib/rocprofiler to lib/rocprofiler-sdk * Move lib/rocprofiler-tool to lib/rocprofiler-sdk-tool * Update lib/CMakeLists.txt - add_subdirectory(rocprofiler-sdk) - add_subdirectory(rocprofiler-sdk-tool) * Update lib/rocprofiler-sdk/CMakeLists.txt * Rename rocprofiler-tool to rocprofiler-sdk-tool * Replace include rocprofiler/ with include rocprofiler-sdk/ * Replace include lib/rocprofiler/ with include lib/rocprofiler-sdk/ * Set VERSION to 0.0.0 and finish install to rocprofiler-sdk * More fixes for rocprofiler -> rocprofiler-sdk - fix issue with rocprofiler-sdk-config.cmake.in - fix counters xml install path * Fix documentation generation * Create rocprofiler_LIB_ROCPROFILER_SDK_DIR for build tree * cmake formatting (cmake-format) (#264) Co-authored-by: jrmadsen <jrmadsen@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
59 lines
1.9 KiB
CMake
59 lines
1.9 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
project(rocprofiler-tests-kernel-tracing LANGUAGES CXX)
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
|
|
add_library(kernel-tracing-test-tool SHARED)
|
|
target_sources(kernel-tracing-test-tool PRIVATE kernel-tracing.cpp)
|
|
target_link_libraries(
|
|
kernel-tracing-test-tool
|
|
PRIVATE rocprofiler::rocprofiler rocprofiler::cereal
|
|
$<TARGET_NAME_IF_EXISTS:rocprofiler::tests-build-flags>)
|
|
set_target_properties(
|
|
kernel-tracing-test-tool PROPERTIES INSTALL_RPATH "\$ORIGIN:\$ORIGIN/.."
|
|
INSTALL_RPATH_USE_LINK_PATH ON)
|
|
|
|
install(
|
|
TARGETS kernel-tracing-test-tool
|
|
DESTINATION lib/rocprofiler-sdk
|
|
COMPONENT rocprofiler-test-libs)
|
|
|
|
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV)
|
|
set(PRELOAD_ENV
|
|
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}:$<TARGET_FILE:kernel-tracing-test-tool>")
|
|
else()
|
|
set(PRELOAD_ENV "LD_PRELOAD=$<TARGET_FILE:kernel-tracing-test-tool>")
|
|
endif()
|
|
|
|
add_test(NAME test-kernel-tracing-execute COMMAND $<TARGET_FILE:reproducible-runtime>)
|
|
|
|
set_tests_properties(
|
|
test-kernel-tracing-execute
|
|
PROPERTIES
|
|
TIMEOUT
|
|
45
|
|
LABELS
|
|
"integration-tests"
|
|
ENVIRONMENT
|
|
"${PRELOAD_ENV};HSA_TOOLS_LIB=$<TARGET_FILE:rocprofiler::rocprofiler-shared-library>"
|
|
FAIL_REGULAR_EXPRESSION
|
|
"threw an exception")
|
|
|
|
foreach(FILENAME validate.py pytest.ini conftest.py)
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}
|
|
${CMAKE_CURRENT_BINARY_DIR}/${FILENAME} COPYONLY)
|
|
endforeach()
|
|
|
|
add_test(NAME test-kernel-tracing-validate
|
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
|
${CMAKE_CURRENT_BINARY_DIR}/kernel-tracing-test-tool.json)
|
|
|
|
set_tests_properties(
|
|
test-kernel-tracing-validate
|
|
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS test-kernel-tracing-execute
|
|
FAIL_REGULAR_EXPRESSION "threw an exception")
|