309a8e069b
* Restructured tests
- support standalone compilation
- move tests/kernel-tracing/serialization.hpp to tests/common/serialization.hpp
- created tests/common library
- handle cloning of cereal library in standalone build
* Update install and packaging
* Update cmake/rocprofiler_config_packaging.cmake
- condense core, samples, development, and tools install components into single rocprofiler-sdk package
- keep tests install component in separate rocprofiler-sdk-tests package
* Update CI workflow to test install and packaging
* Update CI workflow
- install newer cmake for packaging checks
* Update cmake/rocprofiler_config_packaging.cmake
- disable auto-generation of shared-lib deps and provides for tests package
* Update CI workflow
- add sbin to PATH for dpkg install
* Update CI workflow
- remove using github.workspace when installing packages
* Update CI workflow
- hack to fix ordering of dpkg install
* Update CI workflow
- whitespace cleanup
[ROCm/rocprofiler-sdk commit: 8ed68ce4f3]
66 linhas
2.1 KiB
CMake
66 linhas
2.1 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
project(
|
|
rocprofiler-tests-kernel-tracing
|
|
LANGUAGES CXX
|
|
VERSION 0.0.0)
|
|
|
|
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 rocprofiler::tests-build-flags
|
|
rocprofiler::tests-common-library)
|
|
set_target_properties(
|
|
kernel-tracing-test-tool
|
|
PROPERTIES INSTALL_RPATH "\$ORIGIN:\$ORIGIN/.."
|
|
INSTALL_RPATH_USE_LINK_PATH ON
|
|
SOVERSION ${PROJECT_VERSION_MINOR}
|
|
VERSION
|
|
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
|
|
|
|
install(
|
|
TARGETS kernel-tracing-test-tool
|
|
DESTINATION lib/rocprofiler-sdk
|
|
COMPONENT tests)
|
|
|
|
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")
|