2d072f9217
* Add rocprofiler-sdk-utilities.cmake - contains cmake function rocprofiler_sdk_get_gfx_architectures * Update perfetto_reader.py - fix hash collision * Update project names in tests folders - rocprofiler-tests -> rocprofiler-sdk-tests * Fix incorrect allocation-error handling * [CI] Disable openmp tests for navi2, navi3, and navi4 * Suppress leaks by omptarget and llvm --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
44 wiersze
1.5 KiB
CMake
44 wiersze
1.5 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
project(
|
|
rocprofiler-sdk-tests-counter-collection
|
|
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-json-tool>")
|
|
else()
|
|
set(PRELOAD_ENV "LD_PRELOAD=$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
|
endif()
|
|
|
|
set(counter-collection-env
|
|
"${PRELOAD_ENV}" "ROCPROFILER_TOOL_OUTPUT_FILE=counter-collection-test.json"
|
|
"ROCPROFILER_TOOL_CONTEXTS=COUNTER_COLLECTION" "ROCPROF_COUNTERS=SQ_WAVES_sum")
|
|
|
|
add_test(NAME test-counter-collection-execute COMMAND $<TARGET_FILE:multistream>)
|
|
|
|
set_tests_properties(
|
|
test-counter-collection-execute
|
|
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
|
"${counter-collection-env}" FAIL_REGULAR_EXPRESSION
|
|
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
|
|
|
# copy to binary directory
|
|
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
|
|
|
add_test(NAME test-counter-collection-validate
|
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
|
${CMAKE_CURRENT_BINARY_DIR}/counter-collection-test.json)
|
|
|
|
set_tests_properties(
|
|
test-counter-collection-validate
|
|
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
|
test-counter-collection-execute FAIL_REGULAR_EXPRESSION
|
|
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|