dc671497da
* look for symbols in dynsym table * checking both symtab and dynsym * Avoid symbol duplication in non stripped binaries * clang-format * Minor elf_utils.cpp updates - use 'else if' instead of 'if' - logging tweaks * Update registration - tweak logging * Update testing - strip the rocprofiler-sdk-c-tool library - add test-c-tool-rocp-tool-lib-execute test which does NOT LD_PRELOAD the library (uses only ROCP_TOOL_LIBRARIES instead) --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
63 wiersze
1.8 KiB
CMake
63 wiersze
1.8 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
project(
|
|
rocprofiler-tests-c-tool
|
|
LANGUAGES CXX
|
|
VERSION 0.0.0)
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
|
|
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV)
|
|
set(PRELOAD_ENV
|
|
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}:$<TARGET_FILE:rocprofiler-sdk-c-tool>")
|
|
else()
|
|
set(PRELOAD_ENV "LD_PRELOAD=$<TARGET_FILE:rocprofiler-sdk-c-tool>")
|
|
endif()
|
|
|
|
add_test(NAME test-c-tool-execute COMMAND $<TARGET_FILE:transpose> 1)
|
|
|
|
set(c-tool-env
|
|
"${PRELOAD_ENV}"
|
|
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
|
)
|
|
|
|
set_tests_properties(
|
|
test-c-tool-execute
|
|
PROPERTIES
|
|
TIMEOUT
|
|
45
|
|
LABELS
|
|
"integration-tests"
|
|
ENVIRONMENT
|
|
"${c-tool-env}"
|
|
PASS_REGULAR_EXPRESSION
|
|
"Test C tool \\(priority=0\\) is using rocprofiler-sdk v([0-9]+\\.[0-9]+\\.[0-9]+)"
|
|
FAIL_REGULAR_EXPRESSION
|
|
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
|
|
|
# this test uses ROCP_TOOL_LIBRARIES instead of LD_PRELOAD
|
|
add_test(NAME test-c-tool-rocp-tool-lib-execute COMMAND $<TARGET_FILE:transpose> 1)
|
|
|
|
set(c-tool-rocp-tool-lib-env
|
|
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}"
|
|
"ROCP_TOOL_LIBRARIES=$<TARGET_FILE:rocprofiler-sdk-c-tool>"
|
|
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
|
)
|
|
|
|
set_tests_properties(
|
|
test-c-tool-rocp-tool-lib-execute
|
|
PROPERTIES
|
|
TIMEOUT
|
|
45
|
|
LABELS
|
|
"integration-tests"
|
|
ENVIRONMENT
|
|
"${c-tool-rocp-tool-lib-env}"
|
|
PASS_REGULAR_EXPRESSION
|
|
"Test C tool \\(priority=0\\) is using rocprofiler-sdk v([0-9]+\\.[0-9]+\\.[0-9]+)"
|
|
FAIL_REGULAR_EXPRESSION
|
|
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|