2024-04-05 18:32:57 -07:00
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
|
|
project(
|
2025-03-22 18:51:42 -05:00
|
|
|
rocprofiler-sdk-tests-scratch-memory-tracing
|
2024-04-05 18:32:57 -07:00
|
|
|
LANGUAGES CXX
|
|
|
|
|
VERSION 0.0.0)
|
|
|
|
|
|
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
|
|
|
|
2025-11-21 08:06:56 -06:00
|
|
|
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE)
|
2024-04-05 18:32:57 -07:00
|
|
|
set(PRELOAD_ENV
|
2025-11-21 08:06:56 -06:00
|
|
|
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}:$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
|
|
|
|
)
|
2024-04-05 18:32:57 -07:00
|
|
|
else()
|
2025-11-21 08:06:56 -06:00
|
|
|
set(PRELOAD_ENV "$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
2024-04-05 18:32:57 -07:00
|
|
|
endif()
|
|
|
|
|
|
2025-11-21 08:06:56 -06:00
|
|
|
rocprofiler_add_integration_execute_test(
|
|
|
|
|
test-scratch-memory-tracing
|
|
|
|
|
COMMAND $<TARGET_FILE:scratch-memory>
|
|
|
|
|
DEPENDS scratch-memory
|
|
|
|
|
TIMEOUT 45
|
|
|
|
|
LABELS "integration-tests"
|
|
|
|
|
PRELOAD "${PRELOAD_ENV}"
|
|
|
|
|
ENVIRONMENT
|
|
|
|
|
"ROCPROFILER_TOOL_OUTPUT_FILE=scratch-memory-tracing-test.json"
|
|
|
|
|
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
|
|
|
|
FIXTURES_SETUP test-scratch-memory-tracing
|
|
|
|
|
UNSTABLE)
|
2024-04-05 18:32:57 -07:00
|
|
|
|
2024-04-18 03:09:01 -05:00
|
|
|
# copy to binary directory
|
2025-11-21 08:06:56 -06:00
|
|
|
rocprofiler_add_integration_validate_test(
|
|
|
|
|
test-scratch-memory-tracing
|
|
|
|
|
TEST_PATHS validate.py
|
|
|
|
|
COPY conftest.py
|
|
|
|
|
CONFIG pytest.ini
|
|
|
|
|
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/scratch-memory-tracing-test.json
|
|
|
|
|
TIMEOUT 45
|
|
|
|
|
LABELS "integration-tests"
|
|
|
|
|
FIXTURES_REQUIRED test-scratch-memory-tracing
|
|
|
|
|
UNSTABLE)
|