2025-06-06 04:03:14 -05:00
|
|
|
#
|
|
|
|
|
# rocpd command-line tests
|
|
|
|
|
#
|
|
|
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
|
|
|
|
|
|
project(
|
|
|
|
|
rocprofiler-sdk-tests-rocpd
|
|
|
|
|
LANGUAGES CXX
|
|
|
|
|
VERSION 0.0.0)
|
|
|
|
|
|
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
|
|
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
|
|
|
|
|
|
|
|
|
set(rocpd-env
|
|
|
|
|
"PYTHONPATH=${rocprofiler-sdk_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
|
#
|
|
|
|
|
# Test the --help flag works
|
|
|
|
|
#
|
|
|
|
|
#########################################################################################
|
|
|
|
|
|
2025-07-24 17:12:06 -04:00
|
|
|
foreach(_SUBPARSER "" "-convert" "-query" "-summary")
|
2025-06-06 04:03:14 -05:00
|
|
|
string(REPLACE "-" "" _CMD "${_SUBPARSER}")
|
|
|
|
|
|
2025-11-21 08:06:56 -06:00
|
|
|
rocprofiler_add_integration_execute_test(
|
2025-06-06 04:03:14 -05:00
|
|
|
rocpd${_SUBPARSER}-help
|
2025-11-21 08:06:56 -06:00
|
|
|
COMMAND ${Python3_EXECUTABLE} -m rocpd ${_CMD} --help
|
|
|
|
|
DEPENDS rocprofiler-sdk::rocprofv3
|
|
|
|
|
TIMEOUT 120
|
|
|
|
|
LABELS "integration-tests;rocpd"
|
|
|
|
|
PRELOAD "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}"
|
|
|
|
|
ENVIRONMENT "${rocpd-env}")
|
2025-06-06 04:03:14 -05:00
|
|
|
endforeach()
|
|
|
|
|
|
2025-07-24 17:12:06 -04:00
|
|
|
foreach(_MODULE "csv" "pftrace" "otf2" "query" "summary")
|
2025-11-21 08:06:56 -06:00
|
|
|
rocprofiler_add_integration_execute_test(
|
2025-06-06 04:03:14 -05:00
|
|
|
rocpd-module-${_MODULE}-help
|
2025-11-21 08:06:56 -06:00
|
|
|
COMMAND ${Python3_EXECUTABLE} -m rocpd.${_MODULE} --help
|
|
|
|
|
DEPENDS rocprofiler-sdk::rocprofv3
|
|
|
|
|
TIMEOUT 120
|
|
|
|
|
LABELS "integration-tests;rocpd"
|
|
|
|
|
PRELOAD "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}"
|
|
|
|
|
ENVIRONMENT "${rocpd-env}")
|
2025-06-06 04:03:14 -05:00
|
|
|
endforeach()
|