[rocprofiler-sdk] Install unit tests and helper functions for integration tests (#921)
* [rocprofiler-sdk] Install unit tests and helper functions for integration tests * Fix rocprofiler-sdk-tests-target export * Fix handling of cmake policy CMP0174 * Remove -vv from new pytest.ini files * add unit tests and integration tests. * add path to ci workflow. * misc. fixes. * pc sampling tests. * bug fixes. * pc sampling tests fix. * misc. * Update CMakeLists.txt * Update rocprofiler_config_install_tests.cmake, correct license name * fix units tests install issues. * fix counters_def file path. * fix bug, arg shifting. * vendor pytest-cmake. * cmake config fix. missing endfunction() * disable tests, 1.rocprofv3-trace-hip-libs. 2.kernel-tracing. 3.external_correlation 4.rocpd. * disable buffered-tracing test and remove pytest-cmake from requirements.txt. * disable hip-graph-tracing test. * fix building standalone tests to load rocprofiler-sdk cmake package first and then find rocprofiler_sdk_pytest module. * addressed comments: 1.add local bin path to code cov workflow. 2.add to cmake prefix path local bin. 3.use ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE 4.misc. fix * enabled back tests api_buffered, external_correlation_id, hip-graph, kernel-tracing, rocpd, tracing-hip-in-libraries. and misc fixes(formating, extra fixtures for agent-index tests.) * cpack to use llvm bin for .hsaco debug symbols. * psdb tests fixes. * EOL. * misc. fixes and Disable api_buffered_tracing, external_correlation_id, hip-graph-tracing, kernel-tracing, rocpd, summary, tracing-hip-libraries, tracing-plus-counter-collection. * fix incorrect cmakelists file. * strip smallkernel.bin * format. * revert disabled tests commit. * misc. fix in counter tests. * misc. * search codeobj unit test assets in curr bin and install bin. * refactor newly added rocpd tests. * modify tests for newly added hip-host-tracing. * add LD LIB path to units, psdb is failing due to libs not being found. --------- Co-authored-by: Venkateshwar Reddy Kandula <venkateshwar.kandula1306@gmail.com> Co-authored-by: Venkateshwar Reddy Kandula <Venkateshwarreddy.Kandula@amd.com> Co-authored-by: JeniferC99 <150404595+JeniferC99@users.noreply.github.com>
Este cometimento está contido em:
cometido por
GitHub
ascendente
66ea1cdff2
cometimento
a2288eb50b
@@ -333,7 +333,7 @@ jobs:
|
||||
working-directory: projects/rocprofiler-sdk
|
||||
run:
|
||||
LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH
|
||||
python3 ./source/scripts/run-ci.py -B build
|
||||
--name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.system.os }}-${{ matrix.system.gpu }}-codecov
|
||||
--build-jobs 16
|
||||
@@ -357,7 +357,7 @@ jobs:
|
||||
run:
|
||||
find build -type f | egrep '\.gcda$' | xargs rm &&
|
||||
LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH
|
||||
python3 ./source/scripts/run-ci.py -B build
|
||||
--name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.system.os }}-${{ matrix.system.gpu }}-codecov-tests
|
||||
--build-jobs 16
|
||||
@@ -381,7 +381,7 @@ jobs:
|
||||
run:
|
||||
find build -type f | egrep '\.gcda$' | xargs rm &&
|
||||
LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH
|
||||
python3 ./source/scripts/run-ci.py -B build
|
||||
--name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.system.os }}-${{ matrix.system.gpu }}-codecov-samples
|
||||
--build-jobs 16
|
||||
|
||||
@@ -312,7 +312,7 @@ jobs:
|
||||
working-directory: projects/rocprofiler-sdk
|
||||
run: |
|
||||
LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH \
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH \
|
||||
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH \
|
||||
python3 ./source/scripts/run-ci.py \
|
||||
-B build \
|
||||
--name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.system.os }}-${{ matrix.system.gpu }}-core \
|
||||
@@ -359,7 +359,7 @@ jobs:
|
||||
working-directory: projects/rocprofiler-sdk
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH
|
||||
export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH
|
||||
export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH
|
||||
CMAKE_PREFIX_PATH=/opt/rocprofiler-sdk cmake -B build-samples samples
|
||||
CMAKE_PREFIX_PATH=/opt/rocprofiler-sdk cmake -B build-tests -DGPU_TARGETS="gfx942" tests
|
||||
export LD_LIBRARY_PATH=/opt/rocprofiler-sdk/lib:${LD_LIBRARY_PATH}
|
||||
@@ -375,7 +375,7 @@ jobs:
|
||||
working-directory: projects/rocprofiler-sdk
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH
|
||||
export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH
|
||||
export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH
|
||||
export PATH=${PATH}:/usr/local/sbin:/usr/sbin:/sbin
|
||||
ls -la
|
||||
ls -la ./build
|
||||
@@ -390,7 +390,7 @@ jobs:
|
||||
working-directory: projects/rocprofiler-sdk
|
||||
run: |
|
||||
export LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH
|
||||
export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH
|
||||
export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$HOME/.local/bin:$PATH
|
||||
CMAKE_PREFIX_PATH=${{ env.ROCM_PATH }} cmake -B build-samples-deb ${{ env.ROCM_PATH }}/share/rocprofiler-sdk/samples
|
||||
CMAKE_PREFIX_PATH=${{ env.ROCM_PATH }} cmake -B build-tests-deb -DGPU_TARGETS="gfx942" ${{ env.ROCM_PATH }}/share/rocprofiler-sdk/tests
|
||||
cmake --build build-samples-deb --target all --parallel 16
|
||||
@@ -834,6 +834,7 @@ jobs:
|
||||
working-directory: projects/rocprofiler-sdk
|
||||
run:
|
||||
sudo sysctl -w vm.mmap_rnd_bits=28;
|
||||
export PATH="$HOME/.local/bin:$PATH";
|
||||
python3 ./source/scripts/run-ci.py -B build
|
||||
--name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.system.os }}-${{ matrix.system.gpu }}-${{ matrix.system.sanitizer }}
|
||||
--build-jobs 16
|
||||
|
||||
@@ -262,6 +262,107 @@ parse:
|
||||
DIRECTORY: '*'
|
||||
TARGET: '*'
|
||||
SOURCE: '*'
|
||||
pytest_discover_tests:
|
||||
flags:
|
||||
- STRIP_PARAM_BRACKETS
|
||||
- INCLUDE_FILE_PATH
|
||||
- BUNDLE_TESTS
|
||||
kwargs:
|
||||
WORKING_DIRECTORY: '*'
|
||||
TRIM_FROM_NAME: '*'
|
||||
TRIM_FROM_FULL_NAME: '*'
|
||||
TEST_PATHS: '*'
|
||||
LIBRARY_PATH_PREPEND: '*'
|
||||
PYTHON_PATH_PREPEND: '*'
|
||||
ENVIRONMENT: '*'
|
||||
DEPENDS: '*'
|
||||
EXTRA_ARGS: '*'
|
||||
DISCOVERY_EXTRA_ARGS: '*'
|
||||
PROPERTIES: '*'
|
||||
TIMEOUT: '*'
|
||||
LABELS: '*'
|
||||
DISABLED: '*'
|
||||
FIXTURES_SETUP: '*'
|
||||
FIXTURES_REQUIRED: '*'
|
||||
FIXTURES_CLEANUP: '*'
|
||||
DISABLED_MEMCHECKS: '*'
|
||||
ATTACHED_FILES: '*'
|
||||
ATTACHED_FILES_ON_FAIL: '*'
|
||||
PASS_REGULAR_EXPRESSION: '*'
|
||||
FAIL_REGULAR_EXPRESSION: '*'
|
||||
SKIP_REGULAR_EXPRESSION: '*'
|
||||
rocprofiler_add_unit_test:
|
||||
flags:
|
||||
- WILL_FAIL
|
||||
- DISCOVER
|
||||
kwargs:
|
||||
TARGET: '*'
|
||||
TIMEOUT: '*'
|
||||
LABELS: '*'
|
||||
DISABLED: '*'
|
||||
TEST_LIST: '*'
|
||||
TEST_PREFIX: '*'
|
||||
ENVIRONMENT: '*'
|
||||
PASS_REGULAR_EXPRESSION: '*'
|
||||
FAIL_REGULAR_EXPRESSION: '*'
|
||||
SKIP_REGULAR_EXPRESSION: '*'
|
||||
SOURCES: '*'
|
||||
rocprofiler_add_integration_execute_test:
|
||||
flags:
|
||||
- WILL_FAIL
|
||||
- UNSTABLE
|
||||
- DISABLED_CODECOV
|
||||
kwargs:
|
||||
TARGET: '*'
|
||||
WORKING_DIRECTORY: '*'
|
||||
DEPENDS: '*'
|
||||
TIMEOUT: '*'
|
||||
LABELS: '*'
|
||||
DISABLED: '*'
|
||||
FIXTURES_SETUP: '*'
|
||||
FIXTURES_REQUIRED: '*'
|
||||
FIXTURES_CLEANUP: '*'
|
||||
DISABLED_MEMCHECKS: '*'
|
||||
ARGS: '*'
|
||||
COMMAND: '*'
|
||||
ATTACHED_FILES: '*'
|
||||
ATTACHED_FILES_ON_FAIL: '*'
|
||||
ENVIRONMENT: '*'
|
||||
PRELOAD: '*'
|
||||
PASS_REGULAR_EXPRESSION: '*'
|
||||
FAIL_REGULAR_EXPRESSION: '*'
|
||||
SKIP_REGULAR_EXPRESSION: '*'
|
||||
rocprofiler_add_integration_validate_test:
|
||||
flags:
|
||||
- WILL_FAIL
|
||||
- UNSTABLE
|
||||
- DISABLED_CODECOV
|
||||
- STRIP_PARAM_BRACKETS
|
||||
- INCLUDE_FILE_NAME
|
||||
- BUNDLE_TESTS
|
||||
kwargs:
|
||||
TARGET_DEPENDS: '*'
|
||||
WORKING_DIRECTORY: '*'
|
||||
DEPENDS: '*'
|
||||
TIMEOUT: '*'
|
||||
LABELS: '*'
|
||||
DISABLED: '*'
|
||||
FIXTURES_SETUP: '*'
|
||||
FIXTURES_REQUIRED: '*'
|
||||
FIXTURES_CLEANUP: '*'
|
||||
DISABLED_MEMCHECKS: '*'
|
||||
TEST_PATHS: '*'
|
||||
CONFIG: '*'
|
||||
COPY: '*'
|
||||
ARGS: '*'
|
||||
DISCOVERY_ARGS: '*'
|
||||
ATTACHED_FILES: '*'
|
||||
ATTACHED_FILES_ON_FAIL: '*'
|
||||
ENVIRONMENT: '*'
|
||||
PYTHON_PATH: '*'
|
||||
PASS_REGULAR_EXPRESSION: '*'
|
||||
FAIL_REGULAR_EXPRESSION: '*'
|
||||
SKIP_REGULAR_EXPRESSION: '*'
|
||||
override_spec: {}
|
||||
vartags: []
|
||||
proptags: []
|
||||
|
||||
@@ -32,6 +32,7 @@ project(
|
||||
|
||||
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "core")
|
||||
set(PACKAGE_NAME ${PROJECT_NAME})
|
||||
string(REPLACE "-" "_" PACKAGE_NAME_UNDERSCORED ${PACKAGE_NAME})
|
||||
|
||||
if(NOT PROJECT_IS_TOP_LEVEL)
|
||||
set(CMAKE_MESSAGE_INDENT "[${PROJECT_NAME}] ")
|
||||
@@ -120,6 +121,7 @@ add_subdirectory(source)
|
||||
include(rocprofiler_config_install)
|
||||
include(rocprofiler_config_install_roctx)
|
||||
include(rocprofiler_config_install_rocpd)
|
||||
include(rocprofiler_config_install_tests)
|
||||
|
||||
if(ROCPROFILER_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
# Vendor pytest-cmake module.
|
||||
# Discover required rocprofiler_sdk_pytest target.
|
||||
#
|
||||
# This module defines the following imported targets:
|
||||
# rocprofiler_sdk_pytest::Pytest
|
||||
#
|
||||
# It also exposes the 'rocprofiler_sdk_pytest_discover_tests' function, which adds CTest
|
||||
# test for each Pytest test. The "BUNDLE_PYTHON_TESTS" environment variable
|
||||
# can be used to run all discovered tests together.
|
||||
#
|
||||
# Usage:
|
||||
# find_package(rocprofiler_sdk_pytest)
|
||||
# find_package(rocprofiler_sdk_pytest REQUIRED)
|
||||
#
|
||||
# Note:
|
||||
# The Pytest_ROOT environment variable or CMake variable can be used to
|
||||
# prepend a custom search path.
|
||||
# (https://cmake.org/cmake/help/latest/policy/CMP0074.html)
|
||||
|
||||
cmake_minimum_required(VERSION 3.20...4.1)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_program(ROCPSDK_PYTEST_EXECUTABLE NAMES pytest)
|
||||
mark_as_advanced(ROCPSDK_PYTEST_EXECUTABLE)
|
||||
|
||||
if(ROCPSDK_PYTEST_EXECUTABLE)
|
||||
execute_process(
|
||||
COMMAND "${ROCPSDK_PYTEST_EXECUTABLE}" --version
|
||||
OUTPUT_VARIABLE _version
|
||||
ERROR_VARIABLE _version
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(_version MATCHES "pytest (version )?([0-9]+\\.[0-9]+\\.[0-9]+)")
|
||||
set(PYTEST_VERSION "${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(
|
||||
rocprofiler_sdk_pytest
|
||||
REQUIRED_VARS ROCPSDK_PYTEST_EXECUTABLE
|
||||
VERSION_VAR PYTEST_VERSION
|
||||
HANDLE_COMPONENTS HANDLE_VERSION_RANGE)
|
||||
|
||||
if(rocprofiler_sdk_pytest_FOUND AND NOT TARGET rocprofiler_sdk_pytest::Pytest)
|
||||
add_executable(rocprofiler_sdk_pytest::Pytest IMPORTED)
|
||||
set_target_properties(rocprofiler_sdk_pytest::Pytest
|
||||
PROPERTIES IMPORTED_LOCATION "${ROCPSDK_PYTEST_EXECUTABLE}")
|
||||
|
||||
# Function to discover pytest tests and add them to CTest.
|
||||
function(rocprofiler_sdk_pytest_discover_tests NAME)
|
||||
set(_BOOL_ARGS STRIP_PARAM_BRACKETS INCLUDE_FILE_PATH BUNDLE_TESTS)
|
||||
|
||||
set(_SINGLE_VALUE_ARGS WORKING_DIRECTORY TRIM_FROM_NAME TRIM_FROM_FULL_NAME)
|
||||
|
||||
set(_MULTI_VALUE_ARGS
|
||||
TEST_PATHS LIBRARY_PATH_PREPEND PYTHON_PATH_PREPEND ENVIRONMENT PROPERTIES
|
||||
DEPENDS EXTRA_ARGS DISCOVERY_EXTRA_ARGS)
|
||||
|
||||
cmake_parse_arguments(PARSE_ARGV 1 "" "${_BOOL_ARGS}" "${_SINGLE_VALUE_ARGS}"
|
||||
"${_MULTI_VALUE_ARGS}")
|
||||
|
||||
# Set platform-specific library path environment variable.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
set(LIBRARY_ENV_NAME PATH)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||||
set(LIBRARY_ENV_NAME DYLD_LIBRARY_PATH)
|
||||
else()
|
||||
set(LIBRARY_ENV_NAME LD_LIBRARY_PATH)
|
||||
endif()
|
||||
|
||||
# Convert paths to CMake-friendly format.
|
||||
if(DEFINED ENV{${LIBRARY_ENV_NAME}})
|
||||
cmake_path(CONVERT "$ENV{${LIBRARY_ENV_NAME}}" TO_CMAKE_PATH_LIST
|
||||
LIBRARY_PATH)
|
||||
else()
|
||||
set(LIBRARY_PATH "")
|
||||
endif()
|
||||
if(DEFINED ENV{PYTHONPATH})
|
||||
cmake_path(CONVERT "$ENV{PYTHONPATH}" TO_CMAKE_PATH_LIST PYTHON_PATH)
|
||||
else()
|
||||
set(PYTHON_PATH "")
|
||||
endif()
|
||||
|
||||
# Prepend specified paths to the library and Python paths.
|
||||
if(_LIBRARY_PATH_PREPEND)
|
||||
list(REVERSE _LIBRARY_PATH_PREPEND)
|
||||
foreach(_path ${_LIBRARY_PATH_PREPEND})
|
||||
set(LIBRARY_PATH "${_path}" "${LIBRARY_PATH}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(_PYTHON_PATH_PREPEND)
|
||||
list(REVERSE _PYTHON_PATH_PREPEND)
|
||||
foreach(_path ${_PYTHON_PATH_PREPEND})
|
||||
set(PYTHON_PATH "${_path}" "${PYTHON_PATH}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Set default working directory if none is specified.
|
||||
if(NOT _WORKING_DIRECTORY)
|
||||
set(_WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
get_filename_component(_WORKING_DIRECTORY "${_WORKING_DIRECTORY}" REALPATH)
|
||||
|
||||
# Override option by environment variable if available.
|
||||
if(DEFINED ENV{BUNDLE_PYTHON_TESTS})
|
||||
set(_BUNDLE_TESTS $ENV{BUNDLE_PYTHON_TESTS})
|
||||
endif()
|
||||
|
||||
# Define file paths for generated CMake include files.
|
||||
set(_include_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_include.cmake")
|
||||
set(_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_tests.cmake")
|
||||
|
||||
add_custom_command(
|
||||
VERBATIM
|
||||
OUTPUT "${_tests_file}"
|
||||
DEPENDS ${_DEPENDS}
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -D "PYTEST_EXECUTABLE=${ROCPSDK_PYTEST_EXECUTABLE}" -D
|
||||
"TEST_PATHS=${_TEST_PATHS}" -D "TEST_GROUP_NAME=${NAME}" -D
|
||||
"BUNDLE_TESTS=${_BUNDLE_TESTS}" -D "LIBRARY_ENV_NAME=${LIBRARY_ENV_NAME}"
|
||||
-D "LIBRARY_PATH=${LIBRARY_PATH}" -D "PYTHON_PATH=${PYTHON_PATH}" -D
|
||||
"TRIM_FROM_NAME=${_TRIM_FROM_NAME}" -D
|
||||
"TRIM_FROM_FULL_NAME=${_TRIM_FROM_FULL_NAME}" -D
|
||||
"STRIP_PARAM_BRACKETS=${_STRIP_PARAM_BRACKETS}" -D
|
||||
"INCLUDE_FILE_PATH=${_INCLUDE_FILE_PATH}" -D
|
||||
"WORKING_DIRECTORY=${_WORKING_DIRECTORY}" -D
|
||||
"ENVIRONMENT=${_ENVIRONMENT}" -D "TEST_PROPERTIES=${_PROPERTIES}" -D
|
||||
"CTEST_FILE=${_tests_file}" -D "EXTRA_ARGS=${_EXTRA_ARGS}" -D
|
||||
"DISCOVERY_EXTRA_ARGS=${_DISCOVERY_EXTRA_ARGS}" -P
|
||||
"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/rocprofiler_sdk_PytestAddTests.cmake")
|
||||
|
||||
# Create a custom target to run the tests.
|
||||
add_custom_target(${NAME} ALL DEPENDS ${_tests_file})
|
||||
|
||||
file(WRITE "${_include_file}"
|
||||
"if(EXISTS \"${_tests_file}\")\n" " include(\"${_tests_file}\")\n"
|
||||
"else()\n" " add_test(${NAME}_NOT_BUILT ${NAME}_NOT_BUILT)\n" "endif()\n")
|
||||
|
||||
# Register the include file to be processed for tests.
|
||||
set_property(
|
||||
DIRECTORY
|
||||
APPEND
|
||||
PROPERTY TEST_INCLUDE_FILES "${_include_file}")
|
||||
|
||||
endfunction()
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,169 @@
|
||||
# Wrapper used to create individual CTest tests from Pytest tests.
|
||||
cmake_minimum_required(VERSION 3.20...4.1)
|
||||
|
||||
if(CMAKE_SCRIPT_MODE_FILE)
|
||||
|
||||
# Initialize content for the CMake test file.
|
||||
set(_content "")
|
||||
|
||||
# Convert library and Python paths to native format.
|
||||
cmake_path(CONVERT "${LIBRARY_PATH}" TO_NATIVE_PATH_LIST LIBRARY_PATH)
|
||||
cmake_path(CONVERT "${PYTHON_PATH}" TO_NATIVE_PATH_LIST PYTHON_PATH)
|
||||
|
||||
# Serialize path values separated by semicolons (required on Windows).
|
||||
string(REPLACE [[;]] [[\\;]] LIBRARY_PATH "${LIBRARY_PATH}")
|
||||
string(REPLACE [[;]] [[\\;]] PYTHON_PATH "${PYTHON_PATH}")
|
||||
|
||||
# Set up the encoded environment with required paths.
|
||||
set(ENCODED_ENVIRONMENT "${LIBRARY_ENV_NAME}=${LIBRARY_PATH}"
|
||||
"PYTHONPATH=${PYTHON_PATH}")
|
||||
|
||||
# Serialize additional environment variables if any are provided.
|
||||
foreach(env ${ENVIRONMENT})
|
||||
string(REPLACE [[;]] [[\\;]] env "${env}")
|
||||
list(APPEND ENCODED_ENVIRONMENT "${env}")
|
||||
endforeach()
|
||||
|
||||
# Handle EXTRA_ARGS for individual tests
|
||||
if(BUNDLE_TESTS)
|
||||
list(PREPEND EXTRA_ARGS ${DISCOVERY_EXTRA_ARGS})
|
||||
endif()
|
||||
|
||||
set(EXTRA_ARGS_WRAPPED)
|
||||
foreach(arg IN LISTS EXTRA_ARGS)
|
||||
list(APPEND EXTRA_ARGS_WRAPPED "[==[${arg}]==]")
|
||||
endforeach()
|
||||
list(JOIN EXTRA_ARGS_WRAPPED " " EXTRA_ARGS_STR)
|
||||
|
||||
# Macro to create individual tests with optional test properties.
|
||||
macro(create_test NAME IDENTIFIERS)
|
||||
string(APPEND _content "add_test([==[${NAME}]==] \"${PYTEST_EXECUTABLE}\"")
|
||||
|
||||
foreach(identifier ${IDENTIFIERS})
|
||||
string(APPEND _content " [==[${identifier}]==]")
|
||||
endforeach()
|
||||
|
||||
string(APPEND _content " ${EXTRA_ARGS_STR} )\n")
|
||||
|
||||
# Prepare the properties for the test, including the environment settings.
|
||||
set(args "PROPERTIES ENVIRONMENT [==[${ENCODED_ENVIRONMENT}]==]")
|
||||
|
||||
# Add working directory
|
||||
string(APPEND args " WORKING_DIRECTORY [==[${WORKING_DIRECTORY}]==]")
|
||||
|
||||
# Append any additional properties, escaping complex characters if necessary.
|
||||
foreach(property ${TEST_PROPERTIES})
|
||||
if(property MATCHES "[^-./:a-zA-Z0-9_]")
|
||||
string(APPEND args " [==[${property}]==]")
|
||||
else()
|
||||
string(APPEND args " ${property}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Append the test properties to the content.
|
||||
string(APPEND _content "set_tests_properties([==[${NAME}]==] ${args})\n")
|
||||
endmacro()
|
||||
|
||||
# If tests are bundled together, create a single test group.
|
||||
if(BUNDLE_TESTS)
|
||||
create_test("\${TEST_GROUP_NAME}" "\${TEST_PATHS}")
|
||||
|
||||
else()
|
||||
# Set environment variables for collecting tests.
|
||||
set(ENV{${LIBRARY_ENV_NAME}} "${LIBRARY_PATH}")
|
||||
set(ENV{PYTHONPATH} "${PYTHON_PATH}")
|
||||
set(ENV{PYTHONWARNINGS} "ignore")
|
||||
|
||||
set(_command "${PYTEST_EXECUTABLE}" --collect-only -q
|
||||
"--rootdir=${WORKING_DIRECTORY}" ${DISCOVERY_EXTRA_ARGS})
|
||||
|
||||
foreach(test_path IN LISTS TEST_PATHS)
|
||||
list(APPEND _command "${test_path}")
|
||||
endforeach()
|
||||
|
||||
# Collect tests.
|
||||
execute_process(
|
||||
COMMAND ${_command}
|
||||
OUTPUT_VARIABLE _output_lines
|
||||
ERROR_VARIABLE _output_lines
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${WORKING_DIRECTORY})
|
||||
|
||||
# Check for errors during test collection.
|
||||
string(REGEX MATCH "(=+ ERRORS =+|ERROR:).*" _error "${_output_lines}")
|
||||
|
||||
if(_error)
|
||||
message(${_error})
|
||||
message(
|
||||
FATAL_ERROR "An error occurred during the collection of Python tests.")
|
||||
endif()
|
||||
|
||||
# Convert the collected output into a list of lines.
|
||||
string(REPLACE [[;]] [[\;]] _output_lines "${_output_lines}")
|
||||
string(REPLACE "\n" ";" _output_lines "${_output_lines}")
|
||||
|
||||
# Regex pattern to identify pytest test identifiers.
|
||||
set(test_pattern "([^:]+)\.py(::([^:]+))?::([^:]+)")
|
||||
|
||||
# Iterate through each line to identify and process tests.
|
||||
foreach(line ${_output_lines})
|
||||
string(REGEX MATCHALL ${test_pattern} matching "${line}")
|
||||
|
||||
# Skip lines that are not identified as tests.
|
||||
if(NOT matching)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
# Extract file, class, and function names from the test pattern.
|
||||
set(_file ${CMAKE_MATCH_1})
|
||||
set(_class ${CMAKE_MATCH_3})
|
||||
set(_func ${CMAKE_MATCH_4})
|
||||
|
||||
# Optionally trim parts of the class or function name.
|
||||
if(TRIM_FROM_NAME)
|
||||
string(REGEX REPLACE "${TRIM_FROM_NAME}" "" _class "${_class}")
|
||||
string(REGEX REPLACE "${TRIM_FROM_NAME}" "" _func "${_func}")
|
||||
endif()
|
||||
|
||||
# Form the test name using class and function.
|
||||
if(_class)
|
||||
set(test_name "${_class}.${_func}")
|
||||
else()
|
||||
set(test_name "${_func}")
|
||||
endif()
|
||||
|
||||
# Optionally strip parameter brackets from the test name.
|
||||
if(STRIP_PARAM_BRACKETS)
|
||||
string(REGEX REPLACE "\\[(.+)\\]$" ".\\1" test_name "${test_name}")
|
||||
endif()
|
||||
|
||||
# Optionally include the file path in the test name.
|
||||
if(INCLUDE_FILE_PATH)
|
||||
cmake_path(CONVERT "${_file}" TO_CMAKE_PATH_LIST _file)
|
||||
string(REGEX REPLACE "/" "." _file "${_file}")
|
||||
set(test_name "${_file}.${test_name}")
|
||||
endif()
|
||||
|
||||
# Optionally trim parts of the full test name.
|
||||
if(TRIM_FROM_FULL_NAME)
|
||||
string(REGEX REPLACE "${TRIM_FROM_FULL_NAME}" "" test_name "${test_name}")
|
||||
endif()
|
||||
|
||||
# Prefix the test name with the test group name.
|
||||
set(test_name "${TEST_GROUP_NAME}.${test_name}")
|
||||
set(test_case "${line}")
|
||||
|
||||
# Create the test for CTest.
|
||||
create_test("\${test_name}" "\${test_case}")
|
||||
endforeach()
|
||||
|
||||
# Warn if no tests were discovered.
|
||||
if(NOT _content)
|
||||
message(WARNING "No Python tests have been discovered.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Write the generated test content to the specified CTest file.
|
||||
file(WRITE ${CTEST_FILE} ${_content})
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,47 @@
|
||||
# - Config file for @PACKAGE_NAME@ and its component libraries
|
||||
# It defines the following variables:
|
||||
#
|
||||
# @PACKAGE_NAME@_VERSION
|
||||
# @PACKAGE_NAME@_BIN_DIR
|
||||
#
|
||||
|
||||
# prevent "target already exists" error
|
||||
include_guard(DIRECTORY)
|
||||
|
||||
# compute paths
|
||||
get_filename_component(@PACKAGE_NAME@_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
set_and_check(@PACKAGE_NAME@_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||
get_filename_component(@PACKAGE_NAME@_ROOT_DIR ${@PACKAGE_NAME@_INCLUDE_DIR} PATH)
|
||||
set_and_check(@PACKAGE_NAME@_ROOT "${@PACKAGE_NAME@_ROOT_DIR}")
|
||||
|
||||
# extra validation
|
||||
foreach(_FILE @PROJECT_INCLUDE_FILES@)
|
||||
set_and_check(_@PACKAGE_NAME@_INCLUDE_FILE_CHECK
|
||||
"${@PACKAGE_NAME@_INCLUDE_DIR}/${_FILE}")
|
||||
unset(_@PACKAGE_NAME@_INCLUDE_FILE_CHECK)
|
||||
endforeach()
|
||||
|
||||
include("${@PACKAGE_NAME@_CMAKE_DIR}/@PACKAGE_NAME@-targets.cmake")
|
||||
|
||||
set(@PACKAGE_NAME@_TEST_FILES)
|
||||
|
||||
foreach(_FILE @PROJECT_INCLUDE_FILES@)
|
||||
list(APPEND @PACKAGE_NAME@_TEST_FILES "${@PACKAGE_NAME@_INCLUDE_DIR}/${_FILE}")
|
||||
endforeach()
|
||||
|
||||
function(@PACKAGE_NAME_UNDERSCORED@_add_tests)
|
||||
foreach(_FILE ${@PACKAGE_NAME@_TEST_FILES})
|
||||
include("${_FILE}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(
|
||||
@PACKAGE_NAME@
|
||||
FOUND_VAR @PACKAGE_NAME@_FOUND
|
||||
VERSION_VAR @PACKAGE_NAME@_VERSION
|
||||
REQUIRED_VARS @PACKAGE_NAME@_ROOT @PACKAGE_NAME@_VERSION
|
||||
HANDLE_COMPONENTS HANDLE_VERSION_RANGE)
|
||||
@@ -0,0 +1,55 @@
|
||||
#
|
||||
# Unit Test for @RAUT_TARGET@
|
||||
#
|
||||
|
||||
project(rocprofiler-sdk-tests-unit-tests-@RAUT_TARGET@ LANGUAGES C CXX)
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(_NAME @RAUT_TARGET@)
|
||||
set(_SOURCES @RAUT_SOURCES@)
|
||||
set(_LABELS @RAUT_LABELS@)
|
||||
set(_FAIL_REGEX "@RAUT_FAIL_REGULAR_EXPRESSION@")
|
||||
set(_PASS_REGEX "@RAUT_PASS_REGULAR_EXPRESSION@")
|
||||
set(_SKIP_REGEX "@RAUT_SKIP_REGULAR_EXPRESSION@")
|
||||
set(_DISABLED "@RAUT_DISABLED@")
|
||||
set(_ENVIRONMENT "@RAUT_ENVIRONMENT@")
|
||||
set(_PREFIX "@RAUT_TEST_PREFIX@")
|
||||
|
||||
# test sources are in a subfolder
|
||||
set(_TEST_SOURCES)
|
||||
foreach(_FILE ${_SOURCES})
|
||||
list(APPEND _TEST_SOURCES "${CMAKE_CURRENT_LIST_DIR}/${_NAME}/${_FILE}")
|
||||
endforeach()
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET @RAUT_TARGET@
|
||||
SOURCES ${_TEST_SOURCES}
|
||||
TEST_LIST @RAUT_TARGET@_TESTS
|
||||
TEST_PREFIX ${_PREFIX}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${@RAUT_TARGET@_TESTS}
|
||||
PROPERTIES TIMEOUT
|
||||
@RAUT_TIMEOUT@
|
||||
LABELS
|
||||
"${_LABELS}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${_FAIL_REGEX}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"${_PASS_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"${_SKIP_REGEX}"
|
||||
ENVIRONMENT
|
||||
"${_ENVIRONMENT}"
|
||||
DISABLED
|
||||
"${_DISABLED}")
|
||||
|
||||
# Disable specific tests
|
||||
set(_DISABLE_TESTS "@RAUT_DISABLE_TESTS@")
|
||||
if(_DISABLE_TESTS)
|
||||
set_tests_properties(
|
||||
${_DISABLE_TESTS}
|
||||
PROPERTIES DISABLED ON)
|
||||
endif()
|
||||
@@ -51,6 +51,8 @@ install(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/Findlibdw.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/FindrocDecode.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/FindrocJPEG.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/Findrocprofiler_sdk_pytest.cmake
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/rocprofiler_sdk_PytestAddTests.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/Modules
|
||||
COMPONENT development)
|
||||
|
||||
@@ -98,8 +100,10 @@ configure_file(
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/${PACKAGE_NAME}-config-nolink-target.cmake
|
||||
COPYONLY)
|
||||
|
||||
foreach(_FILE rocprofiler-sdk-custom-compilation.cmake rocprofiler-sdk-utilities.cmake
|
||||
Findlibdw.cmake)
|
||||
foreach(
|
||||
_FILE
|
||||
rocprofiler-sdk-custom-compilation.cmake rocprofiler-sdk-utilities.cmake
|
||||
Findlibdw.cmake Findrocprofiler_sdk_pytest.cmake rocprofiler_sdk_PytestAddTests.cmake)
|
||||
configure_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Modules/${_FILE}
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/Modules/${_FILE}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
# include guard
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME tests)
|
||||
set(SDK_PACKAGE_NAME "${PROJECT_NAME}")
|
||||
set(PACKAGE_NAME "${PROJECT_NAME}-tests")
|
||||
|
||||
set(${PACKAGE_NAME}_BUILD_TREE
|
||||
ON
|
||||
CACHE BOOL "" FORCE)
|
||||
|
||||
# do not install the package config if tests are not built
|
||||
if(NOT ROCPROFILER_BUILD_TESTS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
install(
|
||||
EXPORT ${PACKAGE_NAME}-targets
|
||||
FILE ${PACKAGE_NAME}-targets.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}
|
||||
COMPONENT tests)
|
||||
|
||||
rocprofiler_install_env_setup_files(
|
||||
NAME ${PACKAGE_NAME}
|
||||
VERSION ${PROJECT_VERSION}
|
||||
INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}
|
||||
COMPONENT tests)
|
||||
|
||||
# ------------------------------------------------------------------------------#
|
||||
# install tree
|
||||
#
|
||||
set(PROJECT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests/unit-tests)
|
||||
string(REPLACE "-" "_" PACKAGE_NAME_UNDERSCORED ${PACKAGE_NAME})
|
||||
get_property(
|
||||
_ROCP_SDK_TEST_TARGETS
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
PROPERTY rocprofiler-sdk-tests-targets)
|
||||
|
||||
foreach(_TARG ${_ROCP_SDK_TEST_TARGETS})
|
||||
list(APPEND PROJECT_INCLUDE_FILES "${_TARG}.cmake")
|
||||
endforeach()
|
||||
|
||||
configure_package_config_file(
|
||||
${PROJECT_SOURCE_DIR}/cmake/Templates/${PACKAGE_NAME}/config.cmake.in
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/${PACKAGE_NAME}-config.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}
|
||||
INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}
|
||||
PATH_VARS PROJECT_INSTALL_DIR INCLUDE_INSTALL_DIR)
|
||||
|
||||
write_basic_package_version_file(
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/${PACKAGE_NAME}-config-version.cmake
|
||||
VERSION ${PROJECT_VERSION}
|
||||
COMPATIBILITY ExactVersion)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/${PACKAGE_NAME}-config.cmake
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}/${PACKAGE_NAME}-config-version.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PACKAGE_NAME}
|
||||
COMPONENT tests)
|
||||
|
||||
# ------------------------------------------------------------------------------#
|
||||
# build tree
|
||||
#
|
||||
install(
|
||||
FILES ${PROJECT_SOURCE_DIR}/LICENSE.md
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PACKAGE_NAME}
|
||||
COMPONENT tests)
|
||||
@@ -23,6 +23,8 @@ target_compile_definitions(
|
||||
# ensure the env overrides the appending /opt/rocm later
|
||||
string(REPLACE ":" ";" CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH};${CMAKE_PREFIX_PATH}")
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{HOME}/.local")
|
||||
|
||||
set(ROCPROFILER_DEFAULT_ROCM_PATH
|
||||
/opt/rocm
|
||||
CACHE PATH "Default search path for ROCM")
|
||||
|
||||
@@ -248,4 +248,37 @@ set(CPACK_PACKAGE_VERSION
|
||||
"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}.${ROCM_VERSION_FOR_PACKAGE}"
|
||||
)
|
||||
|
||||
# Make CPack use LLVM binutils so ELF64-AMDGPU (.hsaco) is supported
|
||||
find_program(
|
||||
ROCM_LLVM_OBJCOPY
|
||||
NAMES llvm-objcopy
|
||||
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
||||
PATH_SUFFIXES llvm/bin bin)
|
||||
find_program(
|
||||
ROCM_LLVM_OBJDUMP
|
||||
NAMES llvm-objdump
|
||||
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
||||
PATH_SUFFIXES llvm/bin bin)
|
||||
find_program(
|
||||
ROCM_LLVM_READELF
|
||||
NAMES llvm-readelf
|
||||
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
||||
PATH_SUFFIXES llvm/bin bin)
|
||||
|
||||
if(ROCM_LLVM_OBJCOPY)
|
||||
set(CPACK_OBJCOPY_EXECUTABLE
|
||||
"${ROCM_LLVM_OBJCOPY}"
|
||||
CACHE FILEPATH "" FORCE)
|
||||
endif()
|
||||
if(ROCM_LLVM_OBJDUMP)
|
||||
set(CPACK_OBJDUMP_EXECUTABLE
|
||||
"${ROCM_LLVM_OBJDUMP}"
|
||||
CACHE FILEPATH "" FORCE)
|
||||
endif()
|
||||
if(ROCM_LLVM_READELF)
|
||||
set(CPACK_READELF_EXECUTABLE
|
||||
"${ROCM_LLVM_READELF}"
|
||||
CACHE FILEPATH "" FORCE)
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
@@ -1037,6 +1037,145 @@ function(rocprofiler_install_env_setup_files)
|
||||
endfunction()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Adds a unit test subdirectory
|
||||
#
|
||||
|
||||
function(rocprofiler_add_unit_test)
|
||||
cmake_policy(PUSH)
|
||||
if(POLICY CMP0174)
|
||||
cmake_policy(SET CMP0174 OLD)
|
||||
endif()
|
||||
|
||||
# parse args
|
||||
set(_FLAG_OPTS)
|
||||
set(_SINGLE_OPTS
|
||||
"TARGET"
|
||||
"TEST_LIST"
|
||||
"TEST_PREFIX"
|
||||
"TIMEOUT"
|
||||
"LABELS"
|
||||
"DISABLED"
|
||||
"PASS_REGULAR_EXPRESSION"
|
||||
"FAIL_REGULAR_EXPRESSION"
|
||||
"SKIP_REGULAR_EXPRESSION")
|
||||
set(_MULTI_OPTS "SOURCES" "ENVIRONMENT" "DISABLE_TESTS")
|
||||
|
||||
cmake_parse_arguments(RAUT "${_FLAG_OPTS}" "${_SINGLE_OPTS}" "${_MULTI_OPTS}" ${ARGN})
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
macro(set_arg_if_empty _VAR)
|
||||
if(NOT ${_VAR})
|
||||
set(${_VAR} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
foreach(_VAR TARGET SOURCES)
|
||||
if(NOT RAUT_${_VAR})
|
||||
message(
|
||||
FATAL_ERROR "rocprofiler_add_unit_test missing required argument: ${_VAR}"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set_arg_if_empty(RAUT_TIMEOUT 45)
|
||||
set_arg_if_empty(RAUT_LABELS "unittests")
|
||||
set_arg_if_empty(RAUT_TEST_LIST "${RAUT_TARGET}_TESTS")
|
||||
set_arg_if_empty(RAUT_FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
set_arg_if_empty(RAUT_DISABLED "OFF")
|
||||
set_arg_if_empty(RAUT_TEST_PREFIX "unit.")
|
||||
|
||||
set(_DISABLE_TESTS_SOURCE "")
|
||||
if(RAUT_DISABLE_TESTS)
|
||||
foreach(_TEST ${RAUT_DISABLE_TESTS})
|
||||
list(APPEND _DISABLE_TESTS_SOURCE "${RAUT_TEST_PREFIX}${_TEST}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT "unittests" IN_LIST RAUT_LABELS)
|
||||
list(APPEND RAUT_LABELS "unittests")
|
||||
endif()
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET ${RAUT_TARGET}
|
||||
SOURCES ${RAUT_SOURCES}
|
||||
TEST_LIST ${RAUT_TEST_LIST}
|
||||
TEST_PREFIX ${RAUT_TEST_PREFIX}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${${RAUT_TEST_LIST}}
|
||||
PROPERTIES TIMEOUT
|
||||
${RAUT_TIMEOUT}
|
||||
LABELS
|
||||
"${RAUT_LABELS}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${RAUT_FAIL_REGULAR_EXPRESSION}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"${RAUT_PASS_REGULAR_EXPRESSION}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"${RAUT_SKIP_REGULAR_EXPRESSION}"
|
||||
ENVIRONMENT
|
||||
"${RAUT_ENVIRONMENT}"
|
||||
DISABLED
|
||||
${RAUT_DISABLED})
|
||||
|
||||
if(_DISABLE_TESTS_SOURCE)
|
||||
set_tests_properties(${_DISABLE_TESTS_SOURCE} PROPERTIES DISABLED ON)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS ${RAUT_TARGET}
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/bin
|
||||
COMPONENT tests
|
||||
EXPORT rocprofiler-sdk-tests-targets)
|
||||
|
||||
get_property(
|
||||
_ROCP_SDK_TEST_TARGETS
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
PROPERTY rocprofiler-sdk-tests-targets)
|
||||
|
||||
if(RAUT_TARGET IN_LIST _ROCP_SDK_TEST_TARGETS)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Target ${RAUT_TARGET} already exists in rocprofiler-sdk-tests-targets")
|
||||
endif()
|
||||
|
||||
set_property(
|
||||
DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
APPEND
|
||||
PROPERTY rocprofiler-sdk-tests-targets ${RAUT_TARGET})
|
||||
|
||||
string(REPLACE "-" "_" _PACKAGE_NAME_UNDERSCORED "${CMAKE_PROJECT_NAME}")
|
||||
set(RAUT_TEST_PREFIX "${_PACKAGE_NAME_UNDERSCORED}.${RAUT_TEST_PREFIX}")
|
||||
|
||||
set(_DISABLE_TESTS_INSTALLED "")
|
||||
if(RAUT_DISABLE_TESTS)
|
||||
foreach(_TEST ${RAUT_DISABLE_TESTS})
|
||||
list(APPEND _DISABLE_TESTS_INSTALLED "${RAUT_TEST_PREFIX}${_TEST}")
|
||||
endforeach()
|
||||
endif()
|
||||
set(RAUT_DISABLE_TESTS "${_DISABLE_TESTS_INSTALLED}")
|
||||
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/Templates/unit-test.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/${RAUT_TARGET}.cmake
|
||||
@ONLY)
|
||||
|
||||
install(
|
||||
FILES ${RAUT_SOURCES}
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/${RAUT_TARGET}
|
||||
COMPONENT tests)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/${RAUT_TARGET}.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests
|
||||
COMPONENT tests)
|
||||
|
||||
cmake_policy(POP)
|
||||
endfunction()
|
||||
# gets the user local python bin directory from `python3 -m pip install --user ...`
|
||||
#
|
||||
function(_rocprofiler_get_python_user_bin _OUT)
|
||||
|
||||
@@ -2,7 +2,14 @@
|
||||
# Waitcnt ISA tests
|
||||
#
|
||||
|
||||
project(rocprofiler-sdk-tests-att-decoder-waitcnt LANGUAGES C CXX)
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(waitcnt_sources att_decoder_waitcnt_test.cpp)
|
||||
|
||||
add_executable(att-decoder-waitcnt-test)
|
||||
target_sources(att-decoder-waitcnt-test PRIVATE ${waitcnt_sources})
|
||||
target_link_libraries(
|
||||
att-decoder-waitcnt-test
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-att-parser
|
||||
@@ -12,12 +19,11 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
target_sources(att-decoder-waitcnt-test PRIVATE att_decoder_waitcnt_test.cpp)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET att-decoder-waitcnt-test
|
||||
SOURCES att_decoder_waitcnt_test.cpp
|
||||
TEST_LIST att-decoder-waitcnt-test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_tests_properties(${att-decoder-waitcnt-test_TESTS} PROPERTIES TIMEOUT 10 LABELS
|
||||
"unittests")
|
||||
SOURCES ${waitcnt_sources}
|
||||
TIMEOUT 10
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
rocprofiler_deactivate_clang_tidy()
|
||||
|
||||
project(rocprofiler-sdk-unit-tests-aql LANGUAGES C CXX)
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(ROCPROFILER_LIB_AQL_TEST_SOURCES "aql_test.cpp" "helpers.cpp")
|
||||
set(ROCPROFILER_LIB_AQL_TEST_SOURCES aql_test.cpp helpers.cpp)
|
||||
|
||||
add_executable(aql-test)
|
||||
|
||||
target_sources(aql-test PRIVATE ${ROCPROFILER_LIB_AQL_TEST_SOURCES})
|
||||
|
||||
target_link_libraries(
|
||||
aql-test
|
||||
PRIVATE rocprofiler-sdk::counter-test-constants
|
||||
@@ -19,12 +19,14 @@ target_link_libraries(
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
set(_ROCPROFILER_SHARE_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}")
|
||||
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET aql-test
|
||||
SOURCES ${ROCPROFILER_LIB_AQL_TEST_SOURCES}
|
||||
TEST_LIST aql-test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${aql-test_TESTS} PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
TIMEOUT 45
|
||||
ENVIRONMENT
|
||||
"ROCPROFILER_METRICS_PATH=${_ROCPROFILER_SHARE_DIR}"
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
@@ -261,15 +261,35 @@ findViaInstallPath(const std::string& filename)
|
||||
}
|
||||
|
||||
std::string
|
||||
findViaEnvironment(const std::string& filename)
|
||||
locateMetricsFile(std::string_view name)
|
||||
{
|
||||
if(const char* metrics_path = nullptr; (metrics_path = getenv("ROCPROFILER_METRICS_PATH")))
|
||||
namespace fs = common::filesystem;
|
||||
|
||||
// 1) Try env var
|
||||
if(const char* env = std::getenv("ROCPROFILER_METRICS_PATH"))
|
||||
{
|
||||
ROCP_INFO << filename << " is being looked up via env variable ROCPROFILER_METRICS_PATH";
|
||||
return common::filesystem::path{std::string{metrics_path}} / filename;
|
||||
fs::path candidate = fs::path{env} / std::string{name};
|
||||
if(fs::exists(candidate))
|
||||
{
|
||||
ROCP_INFO << name << " found via ROCPROFILER_METRICS_PATH: " << candidate.string();
|
||||
return candidate.string();
|
||||
}
|
||||
ROCP_WARNING << name << " not found at ROCPROFILER_METRICS_PATH (" << env
|
||||
<< "). Falling back to install path.";
|
||||
}
|
||||
// No environment variable, lookup via install path
|
||||
return findViaInstallPath(filename);
|
||||
|
||||
// 2) Fall back to install path
|
||||
auto install_candidate = findViaInstallPath(std::string{name});
|
||||
if(fs::exists(install_candidate))
|
||||
{
|
||||
ROCP_INFO << name << " found via install path: " << install_candidate;
|
||||
return install_candidate;
|
||||
}
|
||||
|
||||
// 3) Neither found -> fatal
|
||||
ROCP_FATAL << "Metric file '" << name << "' not found.\n"
|
||||
<< " Tried: ROCPROFILER_METRICS_PATH/" << name << " and " << install_candidate;
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -298,7 +318,7 @@ loadMetrics(bool reload, const std::optional<ArchMetric> add_metric)
|
||||
}
|
||||
|
||||
auto reload_func = [&]() {
|
||||
auto counters_path = findViaEnvironment("counter_defs.yaml");
|
||||
auto counters_path = locateMetricsFile("counter_defs.yaml");
|
||||
ROCP_FATAL_IF(!common::filesystem::exists(counters_path))
|
||||
<< "metric xml file '" << counters_path << "' does not exist";
|
||||
return std::make_shared<counter_metrics_t>(loadYAML(counters_path, add_metric));
|
||||
|
||||
+10
-8
@@ -14,13 +14,15 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
set(_ROCPROFILER_SHARE_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}")
|
||||
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET parser-test
|
||||
SOURCES ${ROCPROFILER_LIB_PARSER_TEST_SOURCES}
|
||||
TEST_LIST parser-tests_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${parser-tests_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
TIMEOUT 45
|
||||
LABELS unittests
|
||||
ENVIRONMENT
|
||||
"ROCPROFILER_METRICS_PATH=${_ROCPROFILER_SHARE_DIR}"
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
+44
-44
@@ -1,5 +1,7 @@
|
||||
rocprofiler_deactivate_clang_tidy()
|
||||
|
||||
project(rocprofiler-sdk-unit-tests-counters LANGUAGES C CXX)
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
find_program(
|
||||
@@ -18,13 +20,10 @@ function(generate_hsaco TARGET_ID INPUT_FILE OUTPUT_FILE)
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/${OUTPUT_FILE}
|
||||
COMMAND ${amdclangpp_EXECUTABLE} ${CLANG_ARG_LIST}
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy
|
||||
${PROJECT_BINARY_DIR}/source/lib/rocprofiler-sdk/counters/tests/${OUTPUT_FILE}
|
||||
${CMAKE_BINARY_DIR}/bin/${OUTPUT_FILE}
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/bin/${OUTPUT_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/${OUTPUT_FILE}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/${OUTPUT_FILE}
|
||||
${CMAKE_BINARY_DIR}/bin/${OUTPUT_FILE}
|
||||
DEPENDS ${INPUT_FILE}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
COMMENT "Building ${OUTPUT_FILE}...")
|
||||
set(HSACO_TARGET_LIST
|
||||
${HSACO_TARGET_LIST} ${PROJECT_BINARY_DIR}/${OUTPUT_FILE}
|
||||
@@ -39,6 +38,11 @@ endforeach()
|
||||
|
||||
add_custom_target(agent_hasco_targets DEPENDS ${HSACO_TARGET_LIST})
|
||||
|
||||
install(
|
||||
FILES ${HSACO_TARGET_LIST}
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/bin
|
||||
COMPONENT tests)
|
||||
|
||||
add_library(counter_test_constants OBJECT)
|
||||
add_library(rocprofiler-sdk::counter-test-constants ALIAS counter_test_constants)
|
||||
set(ROCPROFILER_LIB_COUNTER_TEST_CONSTANTS_SOURCES hsa_tables.cpp)
|
||||
@@ -60,15 +64,15 @@ set(ROCPROFILER_LIB_COUNTER_TEST_SOURCES
|
||||
device_counting.cpp)
|
||||
set(ROCPROFILER_LIB_COUNTER_TEST_HEADERS code_object_loader.hpp device_counting.hpp)
|
||||
|
||||
add_executable(counter-test)
|
||||
add_executable(counter-tests)
|
||||
|
||||
target_sources(counter-test PRIVATE ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
||||
${ROCPROFILER_LIB_COUNTER_TEST_HEADERS})
|
||||
target_sources(counter-tests PRIVATE ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
||||
${ROCPROFILER_LIB_COUNTER_TEST_HEADERS})
|
||||
|
||||
add_dependencies(counter-test agent_hasco_targets)
|
||||
add_dependencies(counter-tests agent_hasco_targets)
|
||||
|
||||
target_link_libraries(
|
||||
counter-test
|
||||
counter-tests
|
||||
PRIVATE rocprofiler-sdk::counter-test-constants
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip
|
||||
@@ -77,48 +81,44 @@ target_link_libraries(
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET counter-test
|
||||
SOURCES ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
||||
TEST_LIST counter-tests_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${counter-tests_TESTS}
|
||||
PROPERTIES
|
||||
TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"unittests"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"Running non-intercept test(.*)could not be locked for profiling due to lack of permissions.*"
|
||||
)
|
||||
set(_ROCPROFILER_SHARE_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}")
|
||||
|
||||
# unstable counter collection test: Generates HW exception leading to GPU hang or memory
|
||||
# access fault
|
||||
set_tests_properties(
|
||||
device_counting_service_test.sync_counters device_counting_service_test.async_counters
|
||||
PROPERTIES DISABLED "${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}")
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET counter-tests
|
||||
SOURCES ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
||||
TIMEOUT 45
|
||||
ENVIRONMENT
|
||||
"ROCPROFILER_METRICS_PATH=${_ROCPROFILER_SHARE_DIR}"
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"Running non-intercept test(.*)could not be locked for profiling due to lack of permissions.*"
|
||||
DISABLE_TESTS
|
||||
device_counting_service_test.sync_counters
|
||||
device_counting_service_test.async_counters
|
||||
device_counting_service_test.sync_gpu_util_verify
|
||||
device_counting_service_test.sync_sq_waves_verify
|
||||
device_counting_service_test.sync_sq_waves_verify_non_intercept
|
||||
device_counting_service_test.raw_sq_waves_verify
|
||||
device_counting_service_test.sync_grbm_verify)
|
||||
|
||||
set(ROCPROFILER_LIB_CONSUMER_TEST_SOURCES consumer_test.cpp)
|
||||
|
||||
add_executable(consumer-test)
|
||||
target_sources(consumer-test PRIVATE ${ROCPROFILER_LIB_CONSUMER_TEST_SOURCES})
|
||||
add_executable(consumer-tests)
|
||||
target_sources(consumer-tests PRIVATE ${ROCPROFILER_LIB_CONSUMER_TEST_SOURCES})
|
||||
|
||||
target_link_libraries(
|
||||
consumer-test rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
consumer-tests rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
rocprofiler-sdk::rocprofiler-sdk-hip rocprofiler-sdk::rocprofiler-sdk-common-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET consumer-test
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET consumer-tests
|
||||
SOURCES ${ROCPROFILER_LIB_CONSUMER_TEST_SOURCES}
|
||||
TEST_LIST consumer-tests_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${consumer-tests_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
TIMEOUT 45
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
@@ -36,13 +36,11 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET kfd-events-parser
|
||||
SOURCES ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
||||
TEST_LIST kfd-events-parsers_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${kfd-events-parsers_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests;kfd-events" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
SOURCES ${ROCPROFILER_LIB_KFD_EVENTS_TEST_SOURCES}
|
||||
TIMEOUT 45
|
||||
LABELS "unittests;kfd-events"
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
+24
-31
@@ -33,16 +33,14 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET pcs_gfx9_test
|
||||
SOURCES ${ROCPROFILER_LIB_PC_SAMPLING_PARSER_GFX9_TEST_SOURCES}
|
||||
TEST_LIST pcs_gfx9_test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${pcs_gfx9_test_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
LABELS "unittests;pc-sampling;gfx9"
|
||||
TIMEOUT 45
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
add_executable(pcs_id_test)
|
||||
|
||||
@@ -55,15 +53,14 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET pcs_id_test
|
||||
SOURCES ${ROCPROFILER_LIB_PC_SAMPLING_PARSER_ID_TEST_SOURCES}
|
||||
TEST_LIST pcs_id_test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${pcs_id_test_TESTS} PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
LABELS "unittests"
|
||||
TIMEOUT 45
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_executable(pcs_bench_test)
|
||||
|
||||
@@ -91,16 +88,14 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET pcs_thread_test
|
||||
SOURCES ${ROCPROFILER_LIB_PC_SAMPLING_PARSER_MULTIGPU_TEST_SOURCES}
|
||||
TEST_LIST pcs_thread_test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${pcs_thread_test_TESTS}
|
||||
PROPERTIES TIMEOUT 75 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
LABELS "unittests"
|
||||
TIMEOUT 75
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_executable(pcs_gfx12_test)
|
||||
|
||||
@@ -114,13 +109,11 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET pcs_gfx12_test
|
||||
SOURCES ${ROCPROFILER_LIB_PC_SAMPLING_PARSER_GFX12_TEST_SOURCES}
|
||||
TEST_LIST pcs_gfx12_test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${pcs_gfx12_test_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
LABELS "unittests"
|
||||
TIMEOUT 45
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
+8
-10
@@ -19,14 +19,12 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-static-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET pcs-test
|
||||
SOURCES ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES}
|
||||
TEST_LIST pcs-tests_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${pcs-tests_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests;pc-sampling" SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
SOURCES ${ROCPROFILER_LIB_PC_SAMPLING_TEST_SOURCES}
|
||||
TIMEOUT 45
|
||||
LABELS "unittests;pc-sampling"
|
||||
SKIP_REGULAR_EXPRESSION "PC sampling unavailable"
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
@@ -35,15 +35,15 @@ target_link_libraries(
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET rocprofiler-sdk-lib-tests
|
||||
SOURCES ${rocprofiler_lib_sources}
|
||||
TEST_LIST lib_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${lib_TESTS} PROPERTIES TIMEOUT 30 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
TIMEOUT 30
|
||||
LABELS "unittests"
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
# -------------------------------------------------------------------------------------- #
|
||||
#
|
||||
@@ -68,17 +68,16 @@ target_link_libraries(
|
||||
set_target_properties(rocprofiler-sdk-lib-tests-shared PROPERTIES BUILD_RPATH
|
||||
"\$ORIGIN/../lib")
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET rocprofiler-sdk-lib-tests-shared
|
||||
SOURCES ${rocprofiler_shared_lib_sources}
|
||||
TEST_LIST shared_lib_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(rocprofiler-sdk-lib-tests-env
|
||||
"LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}:$ENV{LD_LIBRARY_PATH}")
|
||||
|
||||
set_tests_properties(
|
||||
${shared_lib_TESTS}
|
||||
PROPERTIES TIMEOUT 120 LABELS "unittests" ENVIRONMENT
|
||||
"${rocprofiler-sdk-lib-tests-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET rocprofiler-sdk-lib-tests-shared
|
||||
SOURCES ${rocprofiler_shared_lib_sources}
|
||||
TEST_LIST shared_lib_TESTS
|
||||
TIMEOUT 120
|
||||
LABELS "unittests"
|
||||
ENVIRONMENT
|
||||
"${rocprofiler-sdk-lib-tests-env}"
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
+10
-7
@@ -19,13 +19,16 @@ target_link_libraries(
|
||||
GTest::gtest_main
|
||||
rocprofiler-sdk::counter-test-constants)
|
||||
|
||||
gtest_add_tests(
|
||||
set(_ROCPROFILER_SHARE_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}")
|
||||
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET thread-trace-packet-test
|
||||
SOURCES ${ROCPROFILER_THREAD_TRACE_TEST_SOURCES}
|
||||
TEST_LIST thread-trace-packet-test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${thread-trace-packet-test_TESTS}
|
||||
PROPERTIES TIMEOUT 10 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
TIMEOUT 10
|
||||
LABELS "unittests"
|
||||
ENVIRONMENT
|
||||
"ROCPROFILER_METRICS_PATH=${_ROCPROFILER_SHARE_DIR}"
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
@@ -7,21 +7,17 @@ include(GoogleTest)
|
||||
|
||||
set(buffering_sources buffering-serial.cpp buffering-parallel.cpp buffering-save-load.cpp)
|
||||
|
||||
add_executable(buffering-test)
|
||||
target_sources(buffering-test PRIVATE ${buffering_sources})
|
||||
add_executable(buffering-tests)
|
||||
target_sources(buffering-tests PRIVATE ${buffering_sources})
|
||||
target_link_libraries(
|
||||
buffering-test
|
||||
buffering-tests
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-headers
|
||||
rocprofiler-sdk::rocprofiler-sdk-common-library GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET buffering-test
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET buffering-tests
|
||||
SOURCES ${buffering_sources}
|
||||
TEST_LIST buffering-tests_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${buffering-tests_TESTS}
|
||||
PROPERTIES TIMEOUT 360 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
@@ -1,13 +1,68 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
rocprofiler_deactivate_clang_tidy()
|
||||
|
||||
include(GoogleTest)
|
||||
add_executable(codeobj-library-test)
|
||||
add_executable(codeobj-library-tests)
|
||||
|
||||
set(CODEOBJ_LIB_TEST_SOURCES "codeobj_library_test.cpp")
|
||||
target_sources(codeobj-library-test PRIVATE ${CODEOBJ_LIB_TEST_SOURCES})
|
||||
|
||||
target_sources(codeobj-library-tests PRIVATE ${CODEOBJ_LIB_TEST_SOURCES})
|
||||
|
||||
set(PKG_TEST_BIN_DIR "${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/bin")
|
||||
|
||||
target_compile_definitions(
|
||||
codeobj-library-tests
|
||||
PRIVATE CODEOBJ_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}/"
|
||||
CODEOBJ_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}/${PKG_TEST_BIN_DIR}/")
|
||||
|
||||
configure_file(smallkernel.bin smallkernel.bin COPYONLY)
|
||||
configure_file(hipcc_output.s hipcc_output.s COPYONLY)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/hipcc_output.s
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/bin
|
||||
COMPONENT tests)
|
||||
|
||||
find_program(
|
||||
ROCM_LLVM_STRIP
|
||||
NAMES llvm-strip
|
||||
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
||||
PATH_SUFFIXES llvm/bin bin)
|
||||
|
||||
set(_SMALLBIN "${CMAKE_CURRENT_BINARY_DIR}/smallkernel.bin")
|
||||
set(_SMALLBIN_STRIPPED "${CMAKE_CURRENT_BINARY_DIR}/smallkernel.bin.stripped")
|
||||
|
||||
if(ROCM_LLVM_STRIP)
|
||||
add_custom_command(
|
||||
OUTPUT "${_SMALLBIN_STRIPPED}"
|
||||
COMMAND "${ROCM_LLVM_STRIP}" -s "${_SMALLBIN}" -o "${_SMALLBIN_STRIPPED}"
|
||||
DEPENDS "${_SMALLBIN}"
|
||||
COMMENT
|
||||
"Stripping ALL symbols from smallkernel.bin so CPack won't try to create a dbgsym"
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(strip_smallkernel ALL DEPENDS "${_SMALLBIN_STRIPPED}")
|
||||
|
||||
install(
|
||||
FILES "${_SMALLBIN_STRIPPED}"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/bin"
|
||||
RENAME smallkernel.bin
|
||||
COMPONENT tests)
|
||||
else()
|
||||
message(
|
||||
WARNING
|
||||
"llvm-strip not found; installing unmodified smallkernel.bin (CPack may fail on debuginfo)."
|
||||
)
|
||||
install(
|
||||
FILES "${_SMALLBIN}"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/tests/unit-tests/bin"
|
||||
COMPONENT tests)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
codeobj-library-test
|
||||
codeobj-library-tests
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk-static-library
|
||||
rocprofiler-sdk::rocprofiler-sdk-glog
|
||||
rocprofiler-sdk::rocprofiler-sdk-hsa-runtime
|
||||
@@ -19,19 +74,9 @@ target_link_libraries(
|
||||
rocprofiler-sdk::rocprofiler-sdk-dw
|
||||
rocprofiler-sdk::rocprofiler-sdk-elf)
|
||||
|
||||
gtest_add_tests(
|
||||
TARGET codeobj-library-test
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET codeobj-library-tests
|
||||
SOURCES ${CODEOBJ_LIB_TEST_SOURCES}
|
||||
TEST_LIST codeobj-library-test_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${codeobj-library-test_TESTS}
|
||||
PROPERTIES TIMEOUT 10 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
target_compile_definitions(codeobj-library-test
|
||||
PRIVATE -DCODEOBJ_BINARY_DIR=\"${CMAKE_CURRENT_BINARY_DIR}/\")
|
||||
|
||||
configure_file(smallkernel.bin smallkernel.bin COPYONLY)
|
||||
configure_file(hipcc_output.s hipcc_output.s COPYONLY)
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
@@ -27,17 +27,26 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "lib/common/filesystem.hpp"
|
||||
|
||||
#ifndef CODEOBJ_BINARY_DIR
|
||||
static_assert(false && "Please define CODEOBJ_BINARY_DIR to codeobj tests binary, "
|
||||
"e.g. ../source/lib/tests/codeobj/");
|
||||
#endif
|
||||
|
||||
#ifndef CODEOBJ_INSTALL_DIR
|
||||
static_assert(false && "Please define CODEOBJ_INSTALL_DIR to the installed tests bin directory "
|
||||
"(e.g. <prefix>/share/rocprofiler-sdk/tests/unit-tests/bin/)");
|
||||
#endif
|
||||
|
||||
namespace rocprofiler
|
||||
{
|
||||
namespace testing
|
||||
{
|
||||
namespace codeobjhelper
|
||||
{
|
||||
namespace fs = common::filesystem;
|
||||
|
||||
std::string
|
||||
removeNull(std::string_view s)
|
||||
{
|
||||
@@ -47,11 +56,24 @@ removeNull(std::string_view s)
|
||||
return u;
|
||||
}
|
||||
|
||||
// Helper function for path to a test assets
|
||||
static std::string
|
||||
get_data_file_path(const char* name)
|
||||
{
|
||||
for(const char* base : {CODEOBJ_BINARY_DIR, CODEOBJ_INSTALL_DIR})
|
||||
{
|
||||
std::error_code ec;
|
||||
fs::path p = fs::path(base) / name;
|
||||
if(fs::exists(p, ec) && fs::is_regular_file(p, ec)) return p.string();
|
||||
}
|
||||
return {}; // not found
|
||||
}
|
||||
|
||||
static const std::vector<std::string>&
|
||||
GetHipccOutput()
|
||||
{
|
||||
static std::vector<std::string> result = []() {
|
||||
std::ifstream file(CODEOBJ_BINARY_DIR "hipcc_output.s");
|
||||
std::ifstream file(get_data_file_path("hipcc_output.s"));
|
||||
std::vector<std::string> ret;
|
||||
|
||||
while(file.good())
|
||||
@@ -69,7 +91,7 @@ static const std::vector<char>&
|
||||
GetCodeobjContents()
|
||||
{
|
||||
static std::vector<char> buffer = []() {
|
||||
std::string filename = CODEOBJ_BINARY_DIR "smallkernel.bin";
|
||||
std::string filename = get_data_file_path("smallkernel.bin");
|
||||
std::ifstream file(filename.data(), std::ios::binary);
|
||||
|
||||
using iterator_t = std::istreambuf_iterator<char>;
|
||||
@@ -141,7 +163,9 @@ TEST(codeobj_library, decoder_component)
|
||||
|
||||
CodeobjDecoderComponent component(objdata.data(), objdata.size());
|
||||
|
||||
std::string kernel_with_protocol = "file://" CODEOBJ_BINARY_DIR "smallkernel.bin";
|
||||
std::string smallkernel_path =
|
||||
rocprofiler::testing::codeobjhelper::get_data_file_path("smallkernel.bin");
|
||||
std::string kernel_with_protocol = "file://" + smallkernel_path;
|
||||
LoadedCodeobjDecoder loadecomp(kernel_with_protocol.data(), loaded_offset, objdata.size());
|
||||
|
||||
ASSERT_EQ(component.m_symbol_map.size(), 1);
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#
|
||||
project(rocprofiler-sdk-tests-common LANGUAGES C CXX)
|
||||
|
||||
include(GoogleTest)
|
||||
|
||||
set(common_sources
|
||||
c_array.cpp
|
||||
demangling.cpp
|
||||
@@ -27,13 +25,10 @@ target_link_libraries(
|
||||
GTest::gtest
|
||||
GTest::gtest_main)
|
||||
|
||||
gtest_add_tests(
|
||||
rocprofiler_add_unit_test(
|
||||
TARGET common-tests
|
||||
SOURCES ${common_sources}
|
||||
TEST_LIST common-tests_TESTS
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
${common-tests_TESTS}
|
||||
PROPERTIES TIMEOUT 45 LABELS "unittests" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}" ENVIRONMENT "TEST_LOG_LEVEL=info")
|
||||
ENVIRONMENT
|
||||
"TEST_LOG_LEVEL=info"
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/llvm/lib:/opt/rocm/lib:/opt/rocm/llvm/lib:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
@@ -50,6 +50,7 @@ find_package(Python3 REQUIRED)
|
||||
|
||||
# generally needed
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
find_package(rocprofiler_sdk_pytest REQUIRED)
|
||||
|
||||
# get the gfx architectures that are present on the system
|
||||
rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-tests-gfx-info ECHO)
|
||||
@@ -60,6 +61,9 @@ add_subdirectory(pytest-packages)
|
||||
# common utilities
|
||||
add_subdirectory(common)
|
||||
|
||||
# unit-test subdirectory only exists in rocprofiler-sdk-tests package
|
||||
add_subdirectory(unit-tests)
|
||||
|
||||
# tool libraries used for data collection during integration tests
|
||||
add_subdirectory(tools)
|
||||
|
||||
|
||||
@@ -10,36 +10,29 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV)
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE)
|
||||
set(PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}:$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}:$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
)
|
||||
else()
|
||||
set(PRELOAD_ENV "LD_PRELOAD=$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
||||
set(PRELOAD_ENV "$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
||||
endif()
|
||||
|
||||
add_test(NAME test-async-copy-tracing-execute COMMAND $<TARGET_FILE:transpose>)
|
||||
rocprofiler_add_integration_execute_test(
|
||||
async-copy-tracing
|
||||
TARGET transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPROFILER_TOOL_OUTPUT_FILE=async-copy-tracing-test.json"
|
||||
FIXTURES_SETUP async-copy-tracing)
|
||||
|
||||
set(async-copy-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=async-copy-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-async-copy-tracing-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
||||
"${async-copy-tracing-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-async-copy-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/async-copy-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-async-copy-tracing-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
test-async-copy-tracing-execute FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
async-copy-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED async-copy-tracing
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/async-copy-tracing-test.json)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -10,55 +10,41 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV)
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE)
|
||||
set(PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}:$<TARGET_FILE:rocprofiler-sdk-c-tool>")
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}:$<TARGET_FILE:rocprofiler-sdk-c-tool>")
|
||||
else()
|
||||
set(PRELOAD_ENV "LD_PRELOAD=$<TARGET_FILE:rocprofiler-sdk-c-tool>")
|
||||
set(PRELOAD_ENV "$<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-sdk-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
|
||||
rocprofiler_add_integration_execute_test(
|
||||
test-c-tool
|
||||
COMMAND $<TARGET_FILE:transpose> 1
|
||||
DEPENDS transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Test C tool \\(priority=0\\) is using rocprofiler-sdk v([0-9]+\\.[0-9]+\\.[0-9]+)"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}|Internal thread for rocprofiler-sdk should not be created"
|
||||
)
|
||||
|
||||
# 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-sdk-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
|
||||
rocprofiler_add_integration_execute_test(
|
||||
test-c-tool-rocp-tool-lib
|
||||
COMMAND $<TARGET_FILE:transpose> 1
|
||||
DEPENDS transpose rocprofiler-sdk-c-tool
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}"
|
||||
ENVIRONMENT
|
||||
"ROCP_TOOL_LIBRARIES=$<TARGET_FILE:rocprofiler-sdk-c-tool>"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Test C tool \\(priority=0\\) is using rocprofiler-sdk v([0-9]+\\.[0-9]+\\.[0-9]+)"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}|Internal thread for rocprofiler-sdk should not be created"
|
||||
)
|
||||
|
||||
@@ -166,17 +166,384 @@ endif()
|
||||
function(rocprofiler_configure_pytest_files)
|
||||
cmake_parse_arguments(RCPF "" "OUTPUT_DIRECTORY" "COPY;CONFIG" ${ARGN})
|
||||
|
||||
function(rocprofiler_configure_pytest_files_check_pytest_ini _FILENAME)
|
||||
if(_FILENAME MATCHES ".*pytest\\.ini$")
|
||||
file(READ ${_FILENAME} _pytest_ini_content)
|
||||
if(_pytest_ini_content MATCHES "addopts.* -[a-zA-Z]*v.*")
|
||||
message(
|
||||
SEND_ERROR
|
||||
"${_FILENAME} should not contain -v or -vv. This breaks test discovery in pytest_discover_tests"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(NOT RCPF_OUTPUT_DIRECTORY)
|
||||
set(RCPF_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
foreach(FILENAME ${RCPF_COPY})
|
||||
rocprofiler_configure_pytest_files_check_pytest_ini(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}
|
||||
${RCPF_OUTPUT_DIRECTORY}/${FILENAME} COPYONLY)
|
||||
endforeach()
|
||||
|
||||
foreach(FILENAME ${RCPF_CONFIG})
|
||||
rocprofiler_configure_pytest_files_check_pytest_ini(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME})
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}
|
||||
${RCPF_OUTPUT_DIRECTORY}/${FILENAME} @ONLY)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(rocprofiler_set_integration_test_name _VAR _BASE _CATEGORY)
|
||||
set(_NAME "${_BASE}")
|
||||
|
||||
if("${_NAME}" MATCHES "^tests\\.integration\\.${_CATEGORY}.*")
|
||||
set(_NAME "${_NAME}")
|
||||
else()
|
||||
set(_NAME "tests.integration.${_CATEGORY}.${_NAME}")
|
||||
endif()
|
||||
|
||||
set(${_VAR}
|
||||
"${_NAME}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(rocprofiler_add_integration_execute_test NAME)
|
||||
set(_FLAG_OPTS
|
||||
"WILL_FAIL" # failure is expected in order for test to pass
|
||||
"UNSTABLE" # disable when ROCPROFILER_DISABLE_UNSTABLE_CTESTS=ON
|
||||
"DISABLED_CODECOV" # disable when ROCPROFILER_BUILD_CODECOV=ON
|
||||
)
|
||||
set(_SINGLE_OPTS "TARGET" "WORKING_DIRECTORY" "DEPENDS" "TIMEOUT" "LABELS" "DISABLED"
|
||||
"DISABLED_MEMCHECKS")
|
||||
set(_MULTI_OPTS
|
||||
"ARGS"
|
||||
"COMMAND"
|
||||
"ATTACHED_FILES"
|
||||
"ATTACHED_FILES_ON_FAIL"
|
||||
"ENVIRONMENT"
|
||||
"PRELOAD"
|
||||
"FIXTURES_SETUP"
|
||||
"FIXTURES_REQUIRED"
|
||||
"FIXTURES_CLEANUP"
|
||||
"PASS_REGULAR_EXPRESSION"
|
||||
"FAIL_REGULAR_EXPRESSION"
|
||||
"SKIP_REGULAR_EXPRESSION")
|
||||
|
||||
cmake_parse_arguments(
|
||||
arg
|
||||
"${_FLAG_OPTS}" # <options>
|
||||
"${_SINGLE_OPTS}" # <one_value_keywords>
|
||||
"${_MULTI_OPTS}" # <multi_value_keywords>
|
||||
${ARGN})
|
||||
|
||||
rocprofiler_set_integration_test_name(arg_NAME "${NAME}" "execute")
|
||||
|
||||
if("${arg_ENVIRONMENT}" MATCHES "LD_PRELOAD=.*")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"rocprofiler_add_integration_execute_test: LD_PRELOAD is not allowed in ENVIRONMENT for ${NAME} (${arg_NAME}). Use PRELOAD instead."
|
||||
)
|
||||
endif()
|
||||
|
||||
macro(set_arg_if_empty _VAR)
|
||||
if(NOT ${_VAR})
|
||||
set(${_VAR} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# provide default
|
||||
set_arg_if_empty(arg_FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
set_arg_if_empty(arg_TIMEOUT 60)
|
||||
set_arg_if_empty(arg_FIXTURES_SETUP ${NAME})
|
||||
|
||||
# the test is marked as unstable
|
||||
if(ROCPROFILER_DISABLE_UNSTABLE_CTESTS AND arg_UNSTABLE)
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
|
||||
# the test shouldn't be run for matching memchecks
|
||||
if(arg_DISABLED_MEMCHECKS AND ROCPROFILER_MEMCHECK MATCHES
|
||||
"${arg_DISABLED_MEMCHECKS}")
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
|
||||
# the tests shouldn't be run when rocprofiler-sdk is built with code-coverage support
|
||||
if(ROCPROFILER_BUILD_CODECOV AND arg_DISABLED_CODECOV)
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
|
||||
# insert sanitizer libraries into LD_PRELOAD
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE)
|
||||
list(INSERT arg_PRELOAD 0 "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}")
|
||||
endif()
|
||||
|
||||
if(arg_PRELOAD)
|
||||
list(JOIN arg_PRELOAD ":" _preload)
|
||||
set(arg_ENVIRONMENT "LD_PRELOAD=${_preload}" ${arg_ENVIRONMENT})
|
||||
endif()
|
||||
|
||||
# provide LD_LIBRARY_PATH by default if not specified
|
||||
if(NOT "${arg_ENVIRONMENT}" MATCHES "LD_LIBRARY_PATH=.*")
|
||||
list(
|
||||
APPEND
|
||||
arg_ENVIRONMENT
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT "integration-tests" IN_LIST arg_LABELS)
|
||||
list(APPEND arg_LABELS "integration-tests")
|
||||
endif()
|
||||
|
||||
if(NOT "execution" IN_LIST arg_LABELS)
|
||||
list(APPEND arg_LABELS "execution")
|
||||
endif()
|
||||
|
||||
# Helper to set a property only if the arg is set
|
||||
function(_rocprofiler_set_test_property_if_arg TEST_NAME PROPERTY_NAME)
|
||||
if(arg_${PROPERTY_NAME})
|
||||
set_tests_properties(${TEST_NAME} PROPERTIES ${PROPERTY_NAME}
|
||||
"${arg_${PROPERTY_NAME}}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(DEFINED arg_COMMAND AND DEFINED arg_TARGET)
|
||||
message(SEND_ERROR "Cannot specify both TARGET and COMMAND arguments at once")
|
||||
return()
|
||||
elseif(NOT DEFINED arg_COMMAND AND NOT DEFINED arg_TARGET)
|
||||
message(SEND_ERROR "One of COMMAND or TARGET must be specified")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(DEFINED arg_COMMAND AND NOT DEFINED arg_DEPENDS)
|
||||
message(SEND_ERROR "COMMAND signature without DEPENDS specified")
|
||||
|
||||
elseif(
|
||||
DEFINED arg_COMMAND
|
||||
AND DEFINED arg_DEPENDS
|
||||
AND TARGET ${arg_DEPENDS})
|
||||
|
||||
add_test(NAME "${arg_NAME}" COMMAND ${arg_COMMAND})
|
||||
|
||||
set_tests_properties(${arg_NAME} PROPERTIES RUN_SERIAL ON)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} TIMEOUT)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} LABELS)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} WORKING_DIRECTORY)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} ENVIRONMENT)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} PASS_REGULAR_EXPRESSION)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FAIL_REGULAR_EXPRESSION)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} SKIP_REGULAR_EXPRESSION)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} ATTACHED_FILES)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} ATTACHED_FILES_ON_FAIL)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} DEPENDS)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} DISABLED)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FIXTURES_SETUP)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FIXTURES_REQUIRED)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FIXTURES_CLEANUP)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} WILL_FAIL)
|
||||
|
||||
elseif(arg_TARGET AND TARGET ${arg_TARGET})
|
||||
|
||||
add_test(NAME "${arg_NAME}" COMMAND $<TARGET_FILE:${arg_TARGET}> ${arg_ARGS})
|
||||
|
||||
set_tests_properties(${arg_NAME} PROPERTIES RUN_SERIAL ON)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} TIMEOUT)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} LABELS)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} WORKING_DIRECTORY)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} ENVIRONMENT)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} PASS_REGULAR_EXPRESSION)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FAIL_REGULAR_EXPRESSION)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} SKIP_REGULAR_EXPRESSION)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} ATTACHED_FILES)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} ATTACHED_FILES_ON_FAIL)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} DEPENDS)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} DISABLED)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FIXTURES_SETUP)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FIXTURES_REQUIRED)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} FIXTURES_CLEANUP)
|
||||
_rocprofiler_set_test_property_if_arg(${arg_NAME} WILL_FAIL)
|
||||
|
||||
else()
|
||||
|
||||
message(WARNING "Target '${arg_TARGET}' not found")
|
||||
|
||||
add_test(
|
||||
NAME "${arg_NAME}"
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E echo
|
||||
"'${arg_TARGET}' with args '${arg_ARGS}' could not be executed because the target does not exist"
|
||||
)
|
||||
|
||||
# If this target is accidentally run, report it as a failed test
|
||||
set_tests_properties("${arg_NAME}" PROPERTIES FAIL_REGULAR_EXPRESSION ".*"
|
||||
DISABLED ON)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(rocprofiler_add_integration_validate_test NAME)
|
||||
set(_FLAG_OPTS
|
||||
"WILL_FAIL" # failure is expected in order for test to pass
|
||||
"UNSTABLE" # disable when ROCPROFILER_DISABLE_UNSTABLE_CTESTS=ON
|
||||
"DISABLED_CODECOV" # disable when ROCPROFILER_BUILD_CODECOV=ON
|
||||
"STRIP_PARAM_BRACKETS"
|
||||
"INCLUDE_FILE_PATH"
|
||||
"BUNDLE_TESTS")
|
||||
set(_SINGLE_OPTS "TARGET_DEPENDS" "WORKING_DIRECTORY" "DEPENDS" "TIMEOUT" "LABELS"
|
||||
"DISABLED" "DISABLED_MEMCHECKS")
|
||||
set(_MULTI_OPTS
|
||||
"TEST_PATHS"
|
||||
"CONFIG"
|
||||
"COPY"
|
||||
"ARGS"
|
||||
"DISCOVERY_ARGS"
|
||||
"ATTACHED_FILES"
|
||||
"ATTACHED_FILES_ON_FAIL"
|
||||
"PYTHON_PATH"
|
||||
"ENVIRONMENT"
|
||||
"PRELOAD"
|
||||
"FIXTURES_SETUP"
|
||||
"FIXTURES_REQUIRED"
|
||||
"FIXTURES_CLEANUP"
|
||||
"PASS_REGULAR_EXPRESSION"
|
||||
"FAIL_REGULAR_EXPRESSION"
|
||||
"SKIP_REGULAR_EXPRESSION")
|
||||
|
||||
cmake_parse_arguments(
|
||||
arg
|
||||
"${_FLAG_OPTS}" # <options>
|
||||
"${_SINGLE_OPTS}" # <one_value_keywords>
|
||||
"${_MULTI_OPTS}" # <multi_value_keywords>
|
||||
${ARGN})
|
||||
|
||||
find_package(rocprofiler_sdk_pytest REQUIRED)
|
||||
|
||||
rocprofiler_set_integration_test_name(arg_NAME "${NAME}" "validate")
|
||||
|
||||
if("${arg_ENVIRONMENT}" MATCHES "LD_PRELOAD=.*")
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"rocprofiler_add_integration_validate_test: LD_PRELOAD is not allowed in ENVIRONMENT for ${NAME} (${arg_NAME}). Use PRELOAD instead."
|
||||
)
|
||||
endif()
|
||||
|
||||
macro(set_arg_if_empty _VAR)
|
||||
if(NOT ${_VAR})
|
||||
set(${_VAR} ${ARGN})
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# provide default
|
||||
set_arg_if_empty(arg_FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
set_arg_if_empty(arg_WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set_arg_if_empty(arg_TIMEOUT 60)
|
||||
set_arg_if_empty(arg_FIXTURES_REQUIRED ${NAME})
|
||||
set_arg_if_empty(arg_DISABLED OFF)
|
||||
|
||||
# the test is marked as unstable
|
||||
if(ROCPROFILER_DISABLE_UNSTABLE_CTESTS AND arg_UNSTABLE)
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
|
||||
# the test shouldn't be run for matching memchecks
|
||||
if(arg_DISABLED_MEMCHECKS AND ROCPROFILER_MEMCHECK MATCHES
|
||||
"${arg_DISABLED_MEMCHECKS}")
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
|
||||
# the test shouldn't be run if any of the TARGET_DEPENDS are not built
|
||||
foreach(_TARGET ${arg_TARGET_DEPENDS})
|
||||
if(NOT TARGET ${_TARGET})
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# the tests shouldn't be run when rocprofiler-sdk is built with code-coverage support
|
||||
if(ROCPROFILER_BUILD_CODECOV AND arg_DISABLED_CODECOV)
|
||||
set(arg_DISABLED ON)
|
||||
endif()
|
||||
|
||||
if(NOT "integration-tests" IN_LIST arg_LABELS)
|
||||
list(APPEND arg_LABELS "integration-tests")
|
||||
endif()
|
||||
|
||||
if(NOT "validation" IN_LIST arg_LABELS)
|
||||
list(APPEND arg_LABELS "validation")
|
||||
endif()
|
||||
|
||||
set(arg_PYTHON_PATH "${ROCPROFILER_SDK_TESTS_BINARY_DIR}/pytest-packages"
|
||||
${arg_PYTHON_PATH})
|
||||
|
||||
set(arg_CONFIG ${arg_CONFIG} ${arg_TEST_PATHS} pytest.ini)
|
||||
list(REMOVE_DUPLICATES arg_CONFIG)
|
||||
|
||||
rocprofiler_configure_pytest_files(COPY ${arg_COPY} CONFIG ${arg_CONFIG})
|
||||
|
||||
foreach(_FLAG STRIP_PARAM_BRACKETS INCLUDE_FILE_PATH BUNDLE_TESTS)
|
||||
if(arg_${_FLAG})
|
||||
set(_${_FLAG} ${_FLAG})
|
||||
else()
|
||||
set(_${_FLAG})
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
||||
# Build properties list safely to avoid argument shifting
|
||||
set(_props)
|
||||
list(APPEND _props DISABLED "${arg_DISABLED}")
|
||||
list(APPEND _props TIMEOUT "${arg_TIMEOUT}")
|
||||
|
||||
function(_append_prop _key _listvar)
|
||||
if(DEFINED ${_listvar})
|
||||
list(JOIN ${_listvar} ";" _joined)
|
||||
string(REPLACE ";" "\\;" _escaped "${_joined}")
|
||||
list(APPEND _props ${_key} "${_escaped}")
|
||||
set(_props
|
||||
"${_props}"
|
||||
PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Multi-valued properties (must be joined!)
|
||||
_append_prop(LABELS arg_LABELS)
|
||||
_append_prop(FAIL_REGULAR_EXPRESSION arg_FAIL_REGULAR_EXPRESSION)
|
||||
_append_prop(SKIP_REGULAR_EXPRESSION arg_SKIP_REGULAR_EXPRESSION)
|
||||
_append_prop(PASS_REGULAR_EXPRESSION arg_PASS_REGULAR_EXPRESSION)
|
||||
_append_prop(FIXTURES_REQUIRED arg_FIXTURES_REQUIRED)
|
||||
|
||||
rocprofiler_sdk_pytest_discover_tests(
|
||||
${arg_NAME}
|
||||
${_STRIP_PARAM_BRACKETS}
|
||||
${_INCLUDE_FILE_PATH}
|
||||
${_BUNDLE_TESTS}
|
||||
TEST_PATHS
|
||||
${arg_TEST_PATHS}
|
||||
WORKING_DIRECTORY
|
||||
${arg_WORKING_DIRECTORY}
|
||||
TRIM_FROM_NAME
|
||||
"${arg_TRIM_FROM_NAME}"
|
||||
TRIM_FROM_FULL_NAME
|
||||
"${arg_TRIM_FROM_FULL_NAME}"
|
||||
LIBRARY_PATH_PREPEND
|
||||
${arg_LIBRARY_PATH}
|
||||
PYTHON_PATH_PREPEND
|
||||
${arg_PYTHON_PATH}
|
||||
ENVIRONMENT
|
||||
"${arg_ENVIRONMENT}"
|
||||
DEPENDS
|
||||
"${arg_DEPENDS}"
|
||||
EXTRA_ARGS
|
||||
${arg_ARGS}
|
||||
--durations=20
|
||||
-rA
|
||||
-s
|
||||
-vv
|
||||
DISCOVERY_EXTRA_ARGS
|
||||
${arg_DISCOVERY_ARGS}
|
||||
PROPERTIES
|
||||
${_props})
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -10,52 +10,27 @@ project(
|
||||
|
||||
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()
|
||||
# Execute test - runs multistream with counter collection enabled
|
||||
rocprofiler_add_integration_execute_test(
|
||||
counter-collection
|
||||
TARGET multistream
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
ENVIRONMENT
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=counter-collection-test.json"
|
||||
"ROCPROFILER_TOOL_CONTEXTS=COUNTER_COLLECTION" "ROCPROF_COUNTERS=SQ_WAVES_sum"
|
||||
FIXTURES_SETUP counter-collection
|
||||
UNSTABLE)
|
||||
|
||||
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}"
|
||||
DISABLED
|
||||
"${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}"
|
||||
FIXTURES_SETUP
|
||||
test-counter-collection)
|
||||
|
||||
# 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}"
|
||||
DISABLED
|
||||
"${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}"
|
||||
FIXTURES_REQUIRED
|
||||
test-counter-collection)
|
||||
# Validate test - validates the counter collection JSON output
|
||||
rocprofiler_add_integration_validate_test(
|
||||
counter-collection
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED counter-collection
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/counter-collection-test.json
|
||||
UNSTABLE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -ras -vv
|
||||
addopts = --durations=20 -ras
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -15,37 +15,24 @@ if(ROCPROFILER_MEMCHECK MATCHES "(Address|Thread)Sanitizer" OR ROCPROFILER_BUILD
|
||||
set(PYTEST_ARGS -k "not test_total_runtime")
|
||||
endif()
|
||||
|
||||
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()
|
||||
rocprofiler_add_integration_execute_test(
|
||||
hip-graph-tracing
|
||||
TARGET hip-graph
|
||||
TIMEOUT 100
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
ENVIRONMENT
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=hip-graph-tracing-test.json"
|
||||
"ROCPROFILER_TOOL_CONTEXTS=HIP_API_CALLBACK,HIP_API_BUFFERED,KERNEL_DISPATCH_CALLBACK,KERNEL_DISPATCH_BUFFERED,CODE_OBJECT"
|
||||
FIXTURES_SETUP hip-graph-tracing)
|
||||
|
||||
add_test(NAME test-hip-graph-tracing-execute COMMAND $<TARGET_FILE:hip-graph>)
|
||||
|
||||
set(hip-graph-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=hip-graph-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
"ROCPROFILER_TOOL_CONTEXTS=HIP_API_CALLBACK,HIP_API_BUFFERED,KERNEL_DISPATCH_CALLBACK,KERNEL_DISPATCH_BUFFERED,CODE_OBJECT"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-hip-graph-tracing-execute
|
||||
PROPERTIES TIMEOUT 100 LABELS "integration-tests" ENVIRONMENT
|
||||
"${hip-graph-tracing-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
||||
|
||||
add_test(
|
||||
NAME test-hip-graph-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py ${PYTEST_ARGS}
|
||||
--input ${CMAKE_CURRENT_BINARY_DIR}/hip-graph-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-hip-graph-tracing-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
test-hip-graph-tracing-execute FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
graph-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED hip-graph-tracing
|
||||
DISCOVERY_ARGS ${PYTEST_ARGS}
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/hip-graph-tracing-test.json)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -10,51 +10,31 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV)
|
||||
if(ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE)
|
||||
set(PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}:$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}:$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
)
|
||||
else()
|
||||
set(PRELOAD_ENV "LD_PRELOAD=$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
||||
set(PRELOAD_ENV "$<TARGET_FILE:rocprofiler-sdk-json-tool>")
|
||||
endif()
|
||||
|
||||
add_test(NAME test-hip-host-tracing-execute COMMAND $<TARGET_FILE:hip-host>)
|
||||
rocprofiler_add_integration_execute_test(
|
||||
hip-host-tracing
|
||||
TARGET hip-host
|
||||
TIMEOUT 100
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPROFILER_TOOL_OUTPUT_FILE=hip-host-tracing-test.json"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_SETUP hip-host-tracing)
|
||||
|
||||
set(hip-host-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=hip-host-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-hip-host-tracing-execute
|
||||
PROPERTIES TIMEOUT
|
||||
100
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${hip-host-tracing-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_SETUP
|
||||
hip-host-tracing)
|
||||
|
||||
# copy to binary directory
|
||||
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
||||
|
||||
add_test(
|
||||
NAME test-hip-host-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py ${PYTEST_ARGS}
|
||||
--input ${CMAKE_CURRENT_BINARY_DIR}/hip-host-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-hip-host-tracing-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
test-hip-host-tracing-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_REQUIRED
|
||||
hip-host-tracing)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
hip-host-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_REQUIRED hip-host-tracing
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/hip-host-tracing-test.json)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -10,37 +10,21 @@ project(
|
||||
|
||||
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()
|
||||
rocprofiler_add_integration_execute_test(
|
||||
memory-allocation-tracing
|
||||
TARGET hsa-memory-allocation
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
ENVIRONMENT "ROCPROFILER_TOOL_OUTPUT_FILE=memory-allocation-tracing-test.json"
|
||||
FIXTURES_SETUP memory-allocation-tracing)
|
||||
|
||||
add_test(NAME test-memory-allocation-tracing-execute
|
||||
COMMAND $<TARGET_FILE:hsa-memory-allocation>)
|
||||
|
||||
set(memory-allocation-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=memory-allocation-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-memory-allocation-tracing-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
||||
"${memory-allocation-tracing-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-memory-allocation-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/memory-allocation-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-memory-allocation-tracing-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
test-memory-allocation-tracing-execute FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
memory-allocation-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED memory-allocation-tracing
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/memory-allocation-tracing-test.json)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -17,51 +17,26 @@ if(ROCPROFILER_MEMCHECK MATCHES "(Address|Thread|UndefinedBehavior)Sanitizer"
|
||||
set(PYTEST_ARGS -k "not test_total_runtime")
|
||||
endif()
|
||||
|
||||
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(kernel-tracing-env "ROCPROFILER_TOOL_DISABLE_PERFETTO=1"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=kernel-tracing-test.json")
|
||||
|
||||
add_test(NAME test-kernel-tracing-execute COMMAND $<TARGET_FILE:reproducible-runtime>)
|
||||
rocprofiler_add_integration_execute_test(
|
||||
kernel-tracing
|
||||
TARGET reproducible-runtime
|
||||
TIMEOUT 100
|
||||
LABELS "integration-tests"
|
||||
ENVIRONMENT "${kernel-tracing-env}"
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
FIXTURES_SETUP kernel-tracing)
|
||||
|
||||
set(kernel-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=kernel-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-kernel-tracing-execute
|
||||
PROPERTIES TIMEOUT
|
||||
100
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${kernel-tracing-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_SETUP
|
||||
kernel-tracing)
|
||||
|
||||
# copy to binary directory
|
||||
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
||||
|
||||
add_test(
|
||||
NAME test-kernel-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py ${PYTEST_ARGS}
|
||||
--input ${CMAKE_CURRENT_BINARY_DIR}/kernel-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-kernel-tracing-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
test-kernel-tracing-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_REQUIRED
|
||||
kernel-tracing)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
kernel-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED kernel-tracing
|
||||
DISCOVERY_ARGS ${PYTEST_ARGS}
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/kernel-tracing-test.json
|
||||
UNSTABLE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -15,13 +15,6 @@ if(ROCPROFILER_MEMCHECK MATCHES "(Address|Thread)Sanitizer" OR ROCPROFILER_BUILD
|
||||
set(PYTEST_ARGS -k "not test_total_runtime")
|
||||
endif()
|
||||
|
||||
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(ROCPROFILER_MEMCHECK_TYPES "ThreadSanitizer" "AddressSanitizer"
|
||||
"UndefinedBehaviorSanitizer")
|
||||
|
||||
@@ -37,10 +30,7 @@ if("${openmp-tools-gpu-0-gfx-info}" MATCHES "^gfx(10|11|12)[0-9][0-9]$")
|
||||
set(IS_DISABLED ON)
|
||||
endif()
|
||||
|
||||
add_test(NAME test-openmp-tools-execute COMMAND $<TARGET_FILE:openmp-target>)
|
||||
|
||||
set(openmp-tools-env
|
||||
"${PRELOAD_ENV}"
|
||||
"OMP_NUM_THREADS=2"
|
||||
"OMP_DISPLAY_ENV=1"
|
||||
"OMP_TARGET_OFFLOAD=mandatory"
|
||||
@@ -49,36 +39,24 @@ set(openmp-tools-env
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-openmp-tools-execute
|
||||
PROPERTIES TIMEOUT
|
||||
100
|
||||
LABELS
|
||||
"integration-tests;openmp-target"
|
||||
ENVIRONMENT
|
||||
"${openmp-tools-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
rocprofiler_add_integration_execute_test(
|
||||
openmp-tools
|
||||
TARGET openmp-target
|
||||
TIMEOUT 100
|
||||
LABELS "integration-tests;openmp-target"
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>" "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "${openmp-tools-env}"
|
||||
DISABLED "${IS_DISABLED}"
|
||||
FIXTURES_SETUP openmp-tools)
|
||||
|
||||
# copy to binary directory
|
||||
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
||||
|
||||
add_test(
|
||||
NAME test-openmp-tools-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py ${PYTEST_ARGS}
|
||||
--input ${CMAKE_CURRENT_BINARY_DIR}/openmp-tools-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-openmp-tools-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests;openmp-target"
|
||||
DEPENDS
|
||||
test-openmp-tools-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
openmp-tools
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests;openmp-target"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED openmp-tools
|
||||
DISABLED "${IS_DISABLED}"
|
||||
ARGS ${PYTEST_ARGS} --input ${CMAKE_CURRENT_BINARY_DIR}/openmp-tools-test.json
|
||||
DISCOVERY_ARGS ${PYTEST_ARGS})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -64,22 +64,12 @@ target_link_libraries(
|
||||
# Check if PC sampling is disabled and whether we should disable the test
|
||||
rocprofiler_sdk_pc_sampling_disabled(IS_PC_SAMPLING_DISABLED)
|
||||
|
||||
add_test(NAME pc-sampling-integration-test
|
||||
COMMAND $<TARGET_FILE:pc-sampling-integration-test>)
|
||||
|
||||
set(pc-sampling-integration-test-env "${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
pc-sampling-integration-test
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests;pc-sampling"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable"
|
||||
ENVIRONMENT
|
||||
"${pc-sampling-integration-test-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
COMMAND $<TARGET_FILE:pc-sampling-integration-test>
|
||||
DEPENDS pc-sampling-integration-test-client
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests;pc-sampling"
|
||||
PRELOAD "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}"
|
||||
SKIP_REGULAR_EXPRESSION "PC sampling unavailable"
|
||||
DISABLED "${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
@@ -17,40 +17,35 @@ endif()
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"PYTHONPATH=${rocprofiler-sdk_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages"
|
||||
)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini marker.py COPY validate.py
|
||||
conftest.py)
|
||||
|
||||
add_test(
|
||||
NAME test-roctx-python-bindings-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
roctx-python-bindings
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --marker-trace --summary -u sec -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings -o out --output-format csv
|
||||
json pftrace --log-level config -- ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker.py)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings -o out --output-format csv json
|
||||
pftrace --log-level config -- ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker.py
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests;python-bindings"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT
|
||||
"PYTHONPATH=${rocprofiler-sdk_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages"
|
||||
FIXTURES_SETUP roctx-python-bindings)
|
||||
|
||||
set_tests_properties(
|
||||
test-roctx-python-bindings-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests;python-bindings" ENVIRONMENT
|
||||
"${tracing-env}")
|
||||
|
||||
add_test(
|
||||
NAME test-roctx-python-bindings-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_agent_info.csv
|
||||
--marker-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_marker_api_trace.csv
|
||||
--json-input ${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.pftrace)
|
||||
|
||||
set_tests_properties(
|
||||
test-roctx-python-bindings-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests;python-bindings" DEPENDS
|
||||
"test-roctx-python-bindings-execute" FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
roctx-python-bindings
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py marker.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests;python-bindings"
|
||||
TIMEOUT 45
|
||||
FIXTURES_REQUIRED roctx-python-bindings
|
||||
ARGS --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_agent_info.csv
|
||||
--marker-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_marker_api_trace.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/marker-python-bindings/out_results.pftrace
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -11,13 +11,6 @@ project(
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
find_package(rocDecode)
|
||||
|
||||
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()
|
||||
|
||||
file(GLOB_RECURSE ROCDECODE_VIDEO_FILE
|
||||
"${rocDecode_ROOT_DIR}/share/rocdecode/video/*AMD_driving_virtual_20-H265.265")
|
||||
if(TARGET rocdecode-demo AND NOT EXISTS "${ROCDECODE_VIDEO_FILE}")
|
||||
@@ -30,47 +23,26 @@ if(NOT TARGET rocdecode-demo)
|
||||
set(IS_DISABLED ON)
|
||||
endif()
|
||||
|
||||
add_test(
|
||||
NAME test-rocdecode-tracing-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocdecode-tracing
|
||||
COMMAND
|
||||
$<IF:$<TARGET_EXISTS:rocdecode-demo>,$<$<TARGET_EXISTS:rocdecode-demo>:$<TARGET_FILE:rocdecode-demo>>,${CMAKE_COMMAND}>
|
||||
-i ${ROCDECODE_VIDEO_FILE})
|
||||
$<IF:$<TARGET_EXISTS:rocdecode-demo>,$<TARGET_FILE:rocdecode-demo>,${CMAKE_COMMAND}>
|
||||
-i ${ROCDECODE_VIDEO_FILE}
|
||||
DEPENDS rocdecode-demo
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED}
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>"
|
||||
ENVIRONMENT "ROCPROFILER_TOOL_OUTPUT_FILE=rocdecode-tracing-test.json"
|
||||
FIXTURES_SETUP rocdecode-tracing)
|
||||
|
||||
set(rocdecode-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=rocdecode-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-rocdecode-tracing-execute
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${rocdecode-tracing-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
$<NOT:$<TARGET_EXISTS:rocdecode-demo>>)
|
||||
|
||||
# copy to binary directory
|
||||
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
||||
|
||||
add_test(NAME test-rocdecode-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rocdecode-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-rocdecode-tracing-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
test-rocdecode-tracing-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
$<NOT:$<TARGET_EXISTS:rocdecode-demo>>)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocdecode-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
DISABLED ${IS_DISABLED}
|
||||
FIXTURES_REQUIRED rocdecode-tracing
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/rocdecode-tracing-test.json)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -33,7 +33,6 @@ find_package(rocJPEG)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
set(rocjpeg-tracing-env "${PRELOAD_ENV}")
|
||||
|
||||
set(rocJPEG_IMAGE_DIR "${rocJPEG_ROOT_DIR}/share/rocjpeg/images")
|
||||
if(TARGET rocjpeg-demo AND NOT EXISTS "${rocJPEG_IMAGE_DIR}")
|
||||
@@ -46,47 +45,26 @@ if(NOT TARGET rocjpeg-demo)
|
||||
set(IS_DISABLED ON)
|
||||
endif()
|
||||
|
||||
add_test(
|
||||
NAME test-rocjpeg-tracing-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocjpeg-tracing
|
||||
COMMAND
|
||||
$<IF:$<TARGET_EXISTS:rocjpeg-demo>,$<$<TARGET_EXISTS:rocjpeg-demo>:$<TARGET_FILE:rocjpeg-demo>>,${CMAKE_COMMAND}>
|
||||
-i ${rocJPEG_IMAGE_DIR})
|
||||
-i ${rocJPEG_IMAGE_DIR}
|
||||
DEPENDS rocjpeg-demo
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED}
|
||||
PRELOAD "$<TARGET_FILE:rocprofiler-sdk-json-tool>" "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPROFILER_TOOL_OUTPUT_FILE=rocjpeg-tracing-test.json"
|
||||
FIXTURES_SETUP rocjpeg-tracing)
|
||||
|
||||
set(rocjpeg-tracing-env
|
||||
"${PRELOAD_ENV}"
|
||||
"ROCPROFILER_TOOL_OUTPUT_FILE=rocjpeg-tracing-test.json"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
test-rocjpeg-tracing-execute
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${rocjpeg-tracing-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
|
||||
# copy to binary directory
|
||||
rocprofiler_configure_pytest_files(COPY validate.py conftest.py CONFIG pytest.ini)
|
||||
|
||||
add_test(NAME test-rocjpeg-tracing-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rocjpeg-tracing-test.json)
|
||||
|
||||
set_tests_properties(
|
||||
test-rocjpeg-tracing-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
test-rocjpeg-tracing-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocjpeg-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
DISABLED ${IS_DISABLED}
|
||||
FIXTURES_REQUIRED rocjpeg-tracing
|
||||
ARGS --input ${CMAKE_CURRENT_BINARY_DIR}/rocjpeg-tracing-test.json)
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -12,7 +12,6 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
||||
set(rocpd-env
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}"
|
||||
"PYTHONPATH=${rocprofiler-sdk_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages"
|
||||
)
|
||||
|
||||
@@ -24,23 +23,24 @@ set(rocpd-env
|
||||
|
||||
foreach(_SUBPARSER "" "-convert" "-query" "-summary")
|
||||
string(REPLACE "-" "" _CMD "${_SUBPARSER}")
|
||||
add_test(NAME rocpd${_SUBPARSER}-help COMMAND ${Python3_EXECUTABLE} -m rocpd ${_CMD}
|
||||
--help)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocpd${_SUBPARSER}-help
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests;rocpd" ENVIRONMENT
|
||||
"${rocpd-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
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}")
|
||||
endforeach()
|
||||
|
||||
foreach(_MODULE "csv" "pftrace" "otf2" "query" "summary")
|
||||
add_test(NAME rocpd-module-${_MODULE}-help COMMAND ${Python3_EXECUTABLE} -m
|
||||
rocpd.${_MODULE} --help)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocpd-module-${_MODULE}-help
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests;rocpd" ENVIRONMENT
|
||||
"${rocpd-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
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}")
|
||||
endforeach()
|
||||
|
||||
@@ -10,25 +10,8 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
find_package(Python3 REQUIRED)
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY conftest.py validate.py)
|
||||
|
||||
set(PRELOAD_ENV "${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
add_test(NAME rocprofv3-avail-test-hw-counters
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail>
|
||||
info --pmc)
|
||||
|
||||
add_test(NAME rocprofv3-avail-test-pc-sample-config
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail>
|
||||
info --pc-sampling)
|
||||
|
||||
add_test(NAME rocprofv3-avail-test-check-hw-counters
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail> -d
|
||||
0 pmc-check SQ_WAVES GRBM_COUNT TCC_HIT)
|
||||
|
||||
add_test(NAME rocprofv3-avail-test-check-hw-counters_2
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail>
|
||||
pmc-check SQ_WAVES GRBM_COUNT TCC_HIT:device=0)
|
||||
set(PRELOAD_ENV "${ROCPROFILER_MEMCHECK_PRELOAD_ENV_VALUE}")
|
||||
|
||||
# disable when GPU-0 is navi2, navi3, and navi4
|
||||
list(GET rocprofiler-sdk-tests-gfx-info 0 pc-sampling-gpu-0-gfx-info)
|
||||
@@ -38,61 +21,57 @@ if("${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx(10|11|12)[0-9][0-9]$"
|
||||
set(IS_DISABLED ON)
|
||||
endif()
|
||||
|
||||
set(test-rocprofv3-avail-env "${PRELOAD_ENV}")
|
||||
set(enable_pc_sampling "ROCPROFILER_PC_SAMPLING_BETA_ENABLED=on")
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-avail-test-hw-counters
|
||||
PROPERTIES
|
||||
TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${test-rocprofv3-avail-env}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail> info
|
||||
--pmc
|
||||
DEPENDS rocprofiler-sdk::rocprofv3-avail
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"GPU:[0-9]*\\n*;Name:\\t[a-zA-Z_]*\\n;Counter_Name:\\t[a-zA-Z_]*\\n;Description:\\t(.*)\\n*;Expression:\\t(.)*\\n*;Block:\\t[a-zA-Z]*\\n*;Dimensions:\\t([A-Z_]*)\\t([[0-9]*:[0-9]*\\])*\\n*"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-avail-test-pc-sample-config
|
||||
PROPERTIES
|
||||
TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests;pc-sampling"
|
||||
ENVIRONMENT
|
||||
"${test-rocprofv3-avail-env};${enable_pc_sampling}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail> info
|
||||
--pc-sampling
|
||||
DEPENDS rocprofiler-sdk::rocprofv3-avail
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests;pc-sampling"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPROFILER_PC_SAMPLING_BETA_ENABLED=on"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"GPU[:0-9 ]+\\n*;Name[:a-zA-Z_ ]+\\n;configs[: ]+;Method:(.*)\\n*;Unit:(.*)\\n*;Min_Interval:[0-9]*\\n*;Max_Interval:[0-9]*\\n*;Flags:(.*)\\n*"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-avail-test-check-hw-counters
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
||||
"${test-rocprofv3-avail-env}" DISABLED "${IS_DISABLED}")
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail> -d 0
|
||||
pmc-check SQ_WAVES GRBM_COUNT TCC_HIT
|
||||
DEPENDS rocprofiler-sdk::rocprofv3-avail
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-avail-test-check-hw-counters_2
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
||||
"${test-rocprofv3-avail-env}" DISABLED "${IS_DISABLED}")
|
||||
COMMAND ${Python3_EXECUTABLE} $<TARGET_FILE:rocprofiler-sdk::rocprofv3-avail>
|
||||
pmc-check SQ_WAVES GRBM_COUNT TCC_HIT:device=0
|
||||
DEPENDS rocprofiler-sdk::rocprofv3-avail
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
add_test(NAME rocprofv3-avail-test-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py
|
||||
--rocm-path ${rocprofiler-sdk_ROOT_DIR})
|
||||
|
||||
set(test-rocprofv3-avail-validate-env "${PRELOAD_ENV}" "PYTHONPATH=$ENV{PYTHONPATH}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-avail-test-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${test-rocprofv3-avail-validate-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-avail-test
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --rocm-path ${rocprofiler-sdk_ROOT_DIR}
|
||||
TIMEOUT 45 PRELOAD "${PRELOAD_ENV}"
|
||||
LABELS "integration-tests"
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -10,60 +10,43 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
# disable this test for thread sanitizers because of "signal-unsafe call inside signal"
|
||||
# issues on mi200 and mi300 (works fine on vega20 and navi32)
|
||||
if(ROCPROFILER_MEMCHECK STREQUAL "ThreadSanitizer")
|
||||
set(DISABLE_THIS_TEST ON)
|
||||
set(IS_DISABLED ON)
|
||||
else()
|
||||
# set(DISABLE_THIS_TEST OFF)
|
||||
set(DISABLE_THIS_TEST ON) # this test is currently unstable so we are disabling it
|
||||
# unconditionally for now
|
||||
# set(IS_DISABLED OFF)
|
||||
set(IS_DISABLED ON) # this test is currently unstable so we are disabling it
|
||||
# unconditionally for now
|
||||
endif()
|
||||
|
||||
set(aborted-app-env "${PRELOAD_ENV}" ROCPROF_TESTING_RAISE_SIGNAL=1
|
||||
ROCPROF_INTERNAL_TEST_SIGNAL_HANDLER_VIA_EXIT=1)
|
||||
|
||||
# app-abort
|
||||
add_test(
|
||||
NAME rocprofv3-test-execute-app-abort
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-app-abort
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out-aborted-app -- $<TARGET_FILE:vector-ops> 1 1)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out-aborted-app -- $<TARGET_FILE:vector-ops> 1 1
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED}
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPROF_TESTING_RAISE_SIGNAL=1"
|
||||
"ROCPROF_INTERNAL_TEST_SIGNAL_HANDLER_VIA_EXIT=1"
|
||||
FIXTURES_SETUP rocprofv3-test-app-abort)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-execute-app-abort
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${aborted-app-env}"
|
||||
WILL_FAIL
|
||||
TRUE
|
||||
DISABLED
|
||||
"${DISABLE_THIS_TEST}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-validate-app-abort
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out-aborted-app/out_results.json)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-validate-app-abort
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
"rocprofv3-test-execute-app-abort"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${DISABLE_THIS_TEST}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-app-abort
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini input.json
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED}
|
||||
FIXTURES_REQUIRED rocprofv3-test-app-abort
|
||||
ARGS --json-input ${CMAKE_CURRENT_BINARY_DIR}/out-aborted-app/out_results.json)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+137
-148
@@ -69,72 +69,66 @@ if(ROCPROFILER_DISABLE_UNSTABLE_CTESTS)
|
||||
endif()
|
||||
|
||||
# hsa multiqueue dependency test with lib path
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-hsa-multiqueue-cmd-env-att-lib-path-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-cmd-env-att-lib-path
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
--att-target-cu 1 --att-shader-engine-mask 0x11 --kernel-include-regex copyD
|
||||
--att-buffer-size 0x6000000 --att-simd-select 0x3 --att-serialize-all 1 -o out --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-hsa-multiqueue-cmd-env-att-lib-path-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED})
|
||||
$<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
DISABLED ${IS_DISABLED}
|
||||
FIXTURES_SETUP rocprofv3-test-att-hsa-multiqueue-cmd-env-att-lib-path)
|
||||
|
||||
# hsa multiqueue dependency test with json input
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-hsa-multiqueue-json-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-json
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/json_input -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/att_input.json --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-hsa-multiqueue-json-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED})
|
||||
$<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
DISABLED ${IS_DISABLED}
|
||||
FIXTURES_SETUP rocprofv3-test-att-hsa-multiqueue-json)
|
||||
|
||||
# validate output
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-hsa-multiqueue-cmd-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/cmd_input/out_results.json
|
||||
--code-object-input ${CMAKE_CURRENT_BINARY_DIR} --output-path
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/cmd_input)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-cmd
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED}
|
||||
FIXTURES_REQUIRED rocprofv3-test-att-hsa-multiqueue-cmd-env-att-lib-path
|
||||
ARGS --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/cmd_input/out_results.json
|
||||
--code-object-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
--output-path
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/cmd_input
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-hsa-multiqueue-json-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/json_input/out_results.json
|
||||
--code-object-input ${CMAKE_CURRENT_BINARY_DIR} --output-path
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/json_input)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-hsa-multiqueue-cmd-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
"rocprofv3-test-att-hsa-multiqueue-cmd-ld-lib-path-execute"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError"
|
||||
DISABLED
|
||||
${IS_DISABLED})
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-hsa-multiqueue-json-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
"rocprofv3-test-att-hsa-multiqueue-json-execute"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError"
|
||||
DISABLED
|
||||
${IS_DISABLED})
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-json
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-att-hsa-multiqueue-json
|
||||
DISABLED ${IS_DISABLED}
|
||||
ARGS --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/json_input/out_results.json
|
||||
--code-object-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
--output-path
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa_code_object_testapp-trace/json_input
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
function(configure_att_input _FILENAME)
|
||||
set(LIB_PATH_LOC "${attdecoder_LIB_DIR}")
|
||||
@@ -146,93 +140,93 @@ configure_att_input(att_input.yml)
|
||||
configure_att_input(att_input_will_fail.yml)
|
||||
|
||||
# test yaml input
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-yaml-input
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-yaml-input
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS_NO_LIB}/yaml -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/att_input.yml --echo --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-yaml-input PROPERTIES TIMEOUT 45 LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED})
|
||||
$<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
# Invalid lib path has to fail
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-yaml-input-will-fail
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-yaml-input-will-fail
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/att_input_will_fail.yml --log-level env --echo --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>)
|
||||
$<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-yaml-input-will-fail
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" WILL_FAIL ON DISABLED ${IS_DISABLED})
|
||||
|
||||
add_test(NAME rocprofv3-test-att-library-path-cmd-line-will-fail
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> --att --att-library-path .
|
||||
--log-level env --echo -- $<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-library-path-cmd-line-will-fail
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" WILL_FAIL ON DISABLED ${IS_DISABLED})
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> --att --att-library-path .
|
||||
--log-level env --echo -- $<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-library-path-env-var-will-fail
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS_NO_LIB}/envfail
|
||||
--att-library-path . --echo -- $<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-library-path-env-var-will-fail
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"ROCPROF_ATT_LIBRARY_PATH=${attdecoder_LIB_DIR}"
|
||||
WILL_FAIL
|
||||
ON
|
||||
DISABLED
|
||||
${IS_DISABLED})
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS_NO_LIB}/envfail
|
||||
--att-library-path . --echo -- $<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED}
|
||||
ENVIRONMENT "ROCPROF_ATT_LIBRARY_PATH=${attdecoder_LIB_DIR}")
|
||||
|
||||
add_test(NAME rocprofv3-test-att-env-var
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS_NO_LIB}/envvar
|
||||
-- $<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-env-var
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
||||
"ROCPROF_ATT_LIBRARY_PATH=${attdecoder_LIB_DIR}" DISABLED ${IS_DISABLED})
|
||||
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS_NO_LIB}/envvar --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>
|
||||
DEPENDS hsa_code_object_testapp
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED}
|
||||
ENVIRONMENT "ROCPROF_ATT_LIBRARY_PATH=${attdecoder_LIB_DIR}")
|
||||
#
|
||||
# Uses ATT and Counter Collection at the same time
|
||||
#
|
||||
add_test(NAME rocprofv3-test-att-hsa-multiqueue-plus-pmc-execute
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
--pmc SQ_WAVES -o out -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-hsa-multiqueue-plus-pmc-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED})
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-plus-pmc
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input --pmc
|
||||
SQ_WAVES -o out -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
# Check for conflict PMC + activity
|
||||
add_test(NAME rocprofv3-test-att-hsa-multiqueue-activity-pmc-will-fail
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
--pmc SQ_WAVES -o out --att-activity 8 -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-activity-pmc-will-fail
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED} WILL_FAIL ON)
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input --pmc
|
||||
SQ_WAVES -o out --att-activity 8 -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
# Check for conflict Perfcounters + activity
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-hsa-multiqueue-activity-perf-will-fail
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
--att-perfcounter-ctrl 8 -o out --att-activity 8 -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-hsa-multiqueue-activity-perf-will-fail
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED} WILL_FAIL ON)
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
--att-perfcounter-ctrl 8 -o out --att-activity 8 -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
# ATT plus PC sampling
|
||||
|
||||
@@ -248,39 +242,34 @@ endif()
|
||||
set(PCS_ARGS --pc-sampling-beta-enabled 1 --pc-sampling-unit cycles
|
||||
--pc-sampling-interval 16384 --pc-sampling-method stochastic)
|
||||
|
||||
add_test(NAME rocprofv3-test-att-plus-pc-sampling
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
${PCS_ARGS} -o out -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-plus-pc-sampling
|
||||
PROPERTIES TIMEOUT 90 LABELS "integration-tests;thread-trace;pc-sampling" DISABLED
|
||||
${ATT_PLUS_PCS_DISABLE})
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input
|
||||
${PCS_ARGS} -o out -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 90
|
||||
LABELS "integration-tests;thread-trace;pc-sampling"
|
||||
DISABLED ${ATT_PLUS_PCS_DISABLE})
|
||||
|
||||
# Trace two GPUs
|
||||
add_test(NAME rocprofv3-test-att-gpu-index-two-gpus
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input -o
|
||||
out --att-gpu-index 0,1 -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-gpu-index-two-gpus
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED})
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input -o out
|
||||
--att-gpu-index 0,1 -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED})
|
||||
|
||||
# No machine has gpu index = 9999
|
||||
add_test(NAME rocprofv3-test-att-gpu-index-will-fail
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input -o
|
||||
out --att-gpu-index 0,9999 -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
# The FAIL regex for this test is the ROCP_ERROR specific to invalid device index
|
||||
set_tests_properties(
|
||||
# No machine has gpu index = 9999 The FAIL regex for this test is the ROCP_ERROR specific
|
||||
# to invalid device index
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-gpu-index-will-fail
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DISABLED
|
||||
${IS_DISABLED}
|
||||
WILL_FAIL
|
||||
True
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"Invalid GPU Device Index")
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${COMMON_PARAMS}/cmd_input -o out
|
||||
--att-gpu-index 0,9999 -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
WILL_FAIL
|
||||
DISABLED ${IS_DISABLED}
|
||||
FAIL_REGULAR_EXPRESSION "Invalid GPU Device Index")
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -35,90 +35,112 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(tracing-env "${PRELOAD_ENV}")
|
||||
|
||||
rocprofiler_configure_pytest_files(
|
||||
CONFIG pytest.ini
|
||||
COPY validate.py conftest.py input_absolute_agent_index.yaml
|
||||
input_type_relative_agent_index.yaml input_relative_agent_index.yaml)
|
||||
if(ROCPROFILER_MEMCHECK STREQUAL "LeakSanitizer")
|
||||
set(LOG_LEVEL "warning") # info produces memory leak
|
||||
else()
|
||||
set(LOG_LEVEL "info")
|
||||
endif()
|
||||
|
||||
set(execute_tests
|
||||
rocprofv3-test-agent-index-json-absolute-execute
|
||||
rocprofv3-test-agent-index-json-type-relative-execute
|
||||
rocprofv3-test-agent-index-json-relative-execute)
|
||||
set(input_files
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_absolute_agent_index.yaml
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_type_relative_agent_index.yaml
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_relative_agent_index.yaml)
|
||||
set(output_dir
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-agent-index-absolute
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-agent-index-type-relative
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-agent-index-relative)
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-agent-index-json-absolute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_absolute_agent_index.yaml -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-agent-index-absolute --log-level ${LOG_LEVEL}
|
||||
-- $<TARGET_FILE:transpose>
|
||||
DEPENDS transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-agent-index-json-absolute)
|
||||
|
||||
list(LENGTH execute_tests execute_test_length)
|
||||
foreach(i RANGE 0 ${execute_test_length})
|
||||
if(${i} EQUAL ${execute_test_length})
|
||||
break()
|
||||
endif()
|
||||
list(GET execute_tests ${i} test_name)
|
||||
list(GET input_files ${i} input_file)
|
||||
list(GET output_dir ${i} output)
|
||||
add_test(NAME ${test_name}
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${input_file} -d
|
||||
${output} --log-level ${LOG_LEVEL} -- $<TARGET_FILE:transpose>)
|
||||
set_tests_properties(
|
||||
${test_name}
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${tracing-env}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
endforeach()
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-agent-index-json-type-relative
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_type_relative_agent_index.yaml -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-agent-index-type-relative --log-level
|
||||
${LOG_LEVEL} -- $<TARGET_FILE:transpose>
|
||||
DEPENDS transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-agent-index-json-type-relative)
|
||||
|
||||
set(agent_index_types absolute relative type-relative)
|
||||
set(validate_tests
|
||||
rocprofv3-test-agent-index-json-absolute-validate
|
||||
rocprofv3-test-agent-index-json-relative-validate
|
||||
rocprofv3-test-agent-index-json-type-relative-validate)
|
||||
set(output_dir_name transpose-agent-index-absolute transpose-agent-index-relative
|
||||
transpose-agent-index-type-relative)
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-agent-index-json-relative
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_relative_agent_index.yaml -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-agent-index-relative --log-level ${LOG_LEVEL}
|
||||
-- $<TARGET_FILE:transpose>
|
||||
DEPENDS transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-agent-index-json-relative)
|
||||
|
||||
list(LENGTH validate_tests validate_test_length)
|
||||
foreach(i RANGE 0 ${validate_test_length})
|
||||
if(${i} EQUAL ${validate_test_length})
|
||||
break()
|
||||
endif()
|
||||
list(GET validate_tests ${i} test_name)
|
||||
list(GET agent_index_types ${i} agent_index)
|
||||
list(GET output_dir_name ${i} output)
|
||||
add_test(
|
||||
NAME ${test_name}
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-index
|
||||
${agent_index} --csv-kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}/out_kernel_trace.csv
|
||||
--csv-memory-allocation-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}/out_memory_allocation_trace.csv
|
||||
--csv-memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${output}/out_memory_copy_trace.csv --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_results.json)
|
||||
endforeach()
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-agent-index-json-absolute
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input_absolute_agent_index.yaml input_type_relative_agent_index.yaml
|
||||
input_relative_agent_index.yaml
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-agent-index-json-absolute
|
||||
ARGS --agent-index
|
||||
absolute
|
||||
--csv-kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_kernel_trace.csv
|
||||
--csv-memory-allocation-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_memory_allocation_trace.csv
|
||||
--csv-memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_memory_copy_trace.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_results.json
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
set(dependency_tests
|
||||
rocprofv3-test-agent-index-json-absolute-execute
|
||||
rocprofv3-test-agent-index-json-relative-execute;rocprofv3-test-agent-index-json-absolute-execute
|
||||
rocprofv3-test-agent-index-json-type-relative-execute;rocprofv3-test-agent-index-json-absolute-execute
|
||||
)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-agent-index-json-relative
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input_absolute_agent_index.yaml input_type_relative_agent_index.yaml
|
||||
input_relative_agent_index.yaml
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-agent-index-json-relative
|
||||
rocprofv3-test-agent-index-json-absolute
|
||||
ARGS --agent-index
|
||||
relative
|
||||
--csv-kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-relative/out_kernel_trace.csv
|
||||
--csv-memory-allocation-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-relative/out_memory_allocation_trace.csv
|
||||
--csv-memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-relative/out_memory_copy_trace.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_results.json
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
foreach(i RANGE 0 ${validate_test_length})
|
||||
if(${i} EQUAL ${validate_test_length})
|
||||
break()
|
||||
endif()
|
||||
list(GET validate_tests ${i} test_name)
|
||||
list(GET dependency_tests ${i} dep)
|
||||
set_tests_properties(
|
||||
${test_name} PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS ${dep}
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
endforeach()
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-agent-index-json-type-relative
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input_absolute_agent_index.yaml input_type_relative_agent_index.yaml
|
||||
input_relative_agent_index.yaml
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-agent-index-json-type-relative
|
||||
rocprofv3-test-agent-index-json-absolute
|
||||
ARGS --agent-index
|
||||
type-relative
|
||||
--csv-kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-type-relative/out_kernel_trace.csv
|
||||
--csv-memory-allocation-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-type-relative/out_memory_allocation_trace.csv
|
||||
--csv-memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-type-relative/out_memory_copy_trace.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-agent-index-absolute/out_results.json
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+20
-23
@@ -66,30 +66,27 @@ if(ROCPROFILER_DISABLE_UNSTABLE_CTESTS)
|
||||
endif()
|
||||
|
||||
# consecutive kernel test
|
||||
add_test(
|
||||
NAME rocprofv3-test-att-consecutive-kernels-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-att-consecutive-kernels
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> ${ATT_LIB} --att
|
||||
--att-consecutive-kernels 8 -d ${CMAKE_CURRENT_BINARY_DIR}/%tag%-trace -o out
|
||||
--log-level env -- $<TARGET_FILE:vector-ops>)
|
||||
--log-level env -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
DISABLED ${IS_DISABLED}
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-att-consecutive-kernels)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-consecutive-kernels-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED})
|
||||
|
||||
add_test(NAME rocprofv3-test-att-consecutive-kernels-validate
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py
|
||||
--csv-directory-input ${CMAKE_CURRENT_BINARY_DIR}/vector-ops-trace/)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-att-consecutive-kernels-validate
|
||||
PROPERTIES TIMEOUT
|
||||
60
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
rocprofv3-test-att-consecutive-kernels-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError"
|
||||
DISABLED
|
||||
${IS_DISABLED})
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-att-consecutive-kernels
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-att-consecutive-kernels
|
||||
DISABLED ${IS_DISABLED}
|
||||
ARGS --csv-directory-input ${CMAKE_CURRENT_BINARY_DIR}/vector-ops-trace/
|
||||
FAIL_REGULAR_EXPRESSION "AssertionError")
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -29,86 +29,64 @@ string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(attachment-env
|
||||
"${PRELOAD_ENV}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
|
||||
|
||||
# Test that launches the app and attaches to it (CSV format)
|
||||
add_test(
|
||||
NAME rocprofv3-test-attachment-attach-once-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-attachment-attach-once
|
||||
COMMAND
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/run_attachment_test_unified.sh
|
||||
$<TARGET_FILE:attachment-test> $<TARGET_FILE:rocprofiler-sdk::rocprofv3>
|
||||
${CMAKE_CURRENT_BINARY_DIR} ${LOG_LEVEL} out)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-attachment-attach-once-execute
|
||||
PROPERTIES TIMEOUT
|
||||
60
|
||||
LABELS
|
||||
"integration-tests;attachment"
|
||||
ENVIRONMENT
|
||||
"${attachment-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"ERROR|FATAL|${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"This test is skipped."
|
||||
FIXTURES_SETUP
|
||||
rocprofv3-test-attachment-attach-once
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR} ${LOG_LEVEL} out
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests;attachment"
|
||||
DISABLED ${IS_DISABLED}
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "${attachment-env}"
|
||||
SKIP_REGULAR_EXPRESSION "This test is skipped."
|
||||
FIXTURES_SETUP rocprofv3-test-attachment-attach-once
|
||||
FAIL_REGULAR_EXPRESSION "ERROR|FATAL|${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
# Validate the output from the attached profiling
|
||||
add_test(
|
||||
NAME rocprofv3-test-attachment-attach-once-csv-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_kernel_trace.csv --hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_hsa_api_trace.csv
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_memory_copy_trace.csv
|
||||
--agent-input ${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_agent_info.csv
|
||||
--skip-if ${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-attachment-attach-once-csv
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 30
|
||||
LABELS "integration-tests;attachment"
|
||||
DISABLED ${IS_DISABLED}
|
||||
SKIP_REGULAR_EXPRESSION "SKIPPED"
|
||||
FIXTURES_REQUIRED rocprofv3-test-attachment-attach-once
|
||||
ARGS --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_kernel_trace.csv
|
||||
--hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_hsa_api_trace.csv
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_memory_copy_trace.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_agent_info.csv
|
||||
--skip-if
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-attachment-attach-once-csv-validate
|
||||
PROPERTIES TIMEOUT
|
||||
30
|
||||
LABELS
|
||||
"integration-tests;attachment"
|
||||
DEPENDS
|
||||
rocprofv3-test-attachment-attach-once-execute
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"SKIPPED"
|
||||
FIXTURES_REQUIRED
|
||||
rocprofv3-test-attachment-attach-once
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-attachment-attach-once-json-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json --hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json --skip-if
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-attachment-attach-once-json-validate
|
||||
PROPERTIES TIMEOUT
|
||||
30
|
||||
LABELS
|
||||
"integration-tests;attachment"
|
||||
DEPENDS
|
||||
rocprofv3-test-attachment-attach-once-execute
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"SKIPPED"
|
||||
FIXTURES_REQUIRED
|
||||
rocprofv3-test-attachment-attach-once
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-attachment-attach-once-json
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
TIMEOUT 30
|
||||
LABELS "integration-tests;attachment"
|
||||
DISABLED ${IS_DISABLED}
|
||||
SKIP_REGULAR_EXPRESSION "SKIPPED"
|
||||
FIXTURES_REQUIRED rocprofv3-test-attachment-attach-once
|
||||
ARGS --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--skip-if
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+51
-77
@@ -28,87 +28,61 @@ endif()
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(attachment-env
|
||||
"${PRELOAD_ENV}"
|
||||
"LD_LIBRARY_PATH=$<TARGET_FILE_DIR:rocprofiler-sdk::rocprofiler-sdk-shared-library>:$ENV{LD_LIBRARY_PATH}"
|
||||
)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
|
||||
|
||||
# Test that launches the app and reattaches to it twice (CSV format)
|
||||
add_test(
|
||||
NAME rocprofv3-test-attachment-attach-twice-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-attachment-attach-twice
|
||||
COMMAND
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/run_attachment_test_unified.sh
|
||||
$<TARGET_FILE:attachment-test> $<TARGET_FILE:rocprofiler-sdk::rocprofv3>
|
||||
${CMAKE_CURRENT_BINARY_DIR} ${LOG_LEVEL} out)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-attachment-attach-twice-execute
|
||||
PROPERTIES TIMEOUT
|
||||
120
|
||||
LABELS
|
||||
"integration-tests;attachment"
|
||||
ENVIRONMENT
|
||||
"${attachment-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"ERROR|FATAL|${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"This test is skipped."
|
||||
FIXTURES_SETUP
|
||||
rocprofv3-test-attachment-attach-twice
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
${CMAKE_CURRENT_BINARY_DIR} ${LOG_LEVEL} out
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests;attachment"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FAIL_REGULAR_EXPRESSION "ERROR|FATAL|${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION "This test is skipped."
|
||||
FIXTURES_SETUP rocprofv3-test-attachment-attach-twice
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
# Validate the output from the reattached profiling (CSV)
|
||||
add_test(
|
||||
NAME rocprofv3-test-attachment-attach-twice-csv-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_kernel_trace.csv --hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_hsa_api_trace.csv
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_memory_copy_trace.csv
|
||||
--agent-input ${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_agent_info.csv
|
||||
--skip-if ${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-attachment-attach-twice-csv
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_kernel_trace.csv
|
||||
--hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_hsa_api_trace.csv
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_memory_copy_trace.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_agent_info.csv
|
||||
--skip-if
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped
|
||||
TIMEOUT 30
|
||||
LABELS "integration-tests;attachment"
|
||||
SKIP_REGULAR_EXPRESSION "SKIPPED"
|
||||
FIXTURES_REQUIRED rocprofv3-test-attachment-attach-twice
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-attachment-attach-twice-csv-validate
|
||||
PROPERTIES TIMEOUT
|
||||
30
|
||||
LABELS
|
||||
"integration-tests;attachment"
|
||||
DEPENDS
|
||||
rocprofv3-test-attachment-attach-twice-execute
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"SKIPPED"
|
||||
FIXTURES_REQUIRED
|
||||
rocprofv3-test-attachment-attach-twice
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-attachment-attach-twice-json-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json --hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json --skip-if
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-attachment-attach-twice-json-validate
|
||||
PROPERTIES TIMEOUT
|
||||
30
|
||||
LABELS
|
||||
"integration-tests;attachment"
|
||||
DEPENDS
|
||||
rocprofv3-test-attachment-attach-twice-execute
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"SKIPPED"
|
||||
FIXTURES_REQUIRED
|
||||
rocprofv3-test-attachment-attach-twice
|
||||
DISABLED
|
||||
"${IS_DISABLED}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-attachment-attach-twice-json
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --kernel-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--hsa-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--memory-copy-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/out_results.json
|
||||
--skip-if
|
||||
${CMAKE_CURRENT_BINARY_DIR}/attachment-output/skipped
|
||||
TIMEOUT 30
|
||||
LABELS "integration-tests;attachment"
|
||||
SKIP_REGULAR_EXPRESSION "SKIPPED"
|
||||
FIXTURES_REQUIRED rocprofv3-test-attachment-attach-twice
|
||||
DISABLED "${IS_DISABLED}")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -29,52 +29,35 @@ rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.p
|
||||
#
|
||||
##########################################################################################
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-collection-period-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-collection-period
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --runtime-trace --summary -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period -o out --output-format csv json
|
||||
pftrace otf2 --log-level warning --collection-period 0:1:1 1:1:2 0.5:0.5:0
|
||||
--collection-period-unit sec -- $<TARGET_FILE:reproducible-runtime> 5000 4)
|
||||
--collection-period-unit sec -- $<TARGET_FILE:reproducible-runtime> 5000 4
|
||||
DEPENDS reproducible-runtime
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPROF_COLLECTION_PERIOD_TESTING=true"
|
||||
FIXTURES_SETUP rocprofv3-test-collection-period
|
||||
UNSTABLE)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-collection-period-execute
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${collection-period-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}") # Once stable, should be disabled
|
||||
# via IS_THREAD_SANITIZER (thread
|
||||
# sanitizer has too much
|
||||
# overhead)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-collection-period-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_results.json --pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_results.pftrace --otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_results.otf2
|
||||
--collection-period-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_collection_periods.log)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-collection-period-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
"rocprofv3-test-collection-period-execute"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError"
|
||||
DISABLED
|
||||
"${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}") # Once stable, should be disabled
|
||||
# via IS_THREAD_SANITIZER (thread
|
||||
# sanitizer has too much
|
||||
# overhead)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-collection-period
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_results.pftrace
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_results.otf2
|
||||
--collection-period-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/collection-period/out_collection_periods.log
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-collection-period
|
||||
UNSTABLE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -34,23 +34,21 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
rocprofiler_configure_pytest_files(COPY validate.py input.txt conftest.py
|
||||
CONFIG pytest.ini)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-conversion-script-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.txt -T -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script -o pmc1 --output-format csv --
|
||||
$<TARGET_FILE:vector-ops>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-conversion-script-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-conversion-script
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.txt
|
||||
-T -d ${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script -o pmc1 --output-format
|
||||
csv -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
LABELS "integration-tests"
|
||||
TIMEOUT 45
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
FIXTURES_SETUP rocprofv3-test-conversion-script)
|
||||
|
||||
set(convert_tests rocprofv3-test-conversion-script-convert-no-agent-prefix
|
||||
rocprofv3-test-conversion-script-convert-agent-prefix)
|
||||
@@ -74,45 +72,41 @@ foreach(i RANGE 0 ${convert_test_length})
|
||||
list(GET agent_index_flag ${i} flag)
|
||||
list(GET validate_tests ${i} validate_test_name)
|
||||
if(${flag})
|
||||
add_test(
|
||||
NAME ${test_name}
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE}
|
||||
$<TARGET_FILE:rocprofiler-sdk::convert-counters-collection-format>
|
||||
--input ${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script --output
|
||||
${output} --retain-agent-prefix)
|
||||
|
||||
add_test(NAME ${validate_test_name}
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py
|
||||
${PYTEST_ARGS} --input ${output} --retain-agent-prefix true)
|
||||
set(conversion_cmd
|
||||
${Python3_EXECUTABLE}
|
||||
$<TARGET_FILE:rocprofiler-sdk::convert-counters-collection-format>
|
||||
--input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script
|
||||
--output
|
||||
${output}
|
||||
--retain-agent-prefix)
|
||||
set(validate_args --retain-agent-prefix true)
|
||||
else()
|
||||
add_test(
|
||||
NAME ${test_name}
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE}
|
||||
$<TARGET_FILE:rocprofiler-sdk::convert-counters-collection-format>
|
||||
--input ${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script --output
|
||||
${output})
|
||||
|
||||
add_test(NAME ${validate_test_name}
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py
|
||||
${PYTEST_ARGS} --input ${output} --retain-agent-prefix false)
|
||||
set(conversion_cmd
|
||||
${Python3_EXECUTABLE}
|
||||
$<TARGET_FILE:rocprofiler-sdk::convert-counters-collection-format> --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script --output ${output})
|
||||
set(validate_args --retain-agent-prefix false)
|
||||
endif()
|
||||
set_tests_properties(
|
||||
|
||||
rocprofiler_add_integration_execute_test(
|
||||
${test_name}
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
rocprofv3-test-conversion-script-execute FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
set_tests_properties(
|
||||
COMMAND ${conversion_cmd}
|
||||
DEPENDS rocprofiler-sdk::convert-counters-collection-format
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_REQUIRED rocprofv3-test-conversion-script
|
||||
FIXTURES_SETUP ${test_name})
|
||||
|
||||
rocprofiler_add_integration_validate_test(
|
||||
${validate_test_name}
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
${test_name}
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${ROCPROFILER_DISABLE_UNSTABLE_CTESTS}")
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt
|
||||
CONFIG pytest.ini
|
||||
ARGS --input ${output} ${validate_args}
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED ${test_name}
|
||||
UNSTABLE)
|
||||
endforeach()
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+22
-31
@@ -10,38 +10,29 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.txt extra_counters.yaml)
|
||||
|
||||
# pmc1 with extra counters
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-txt-pmc1-extra-counters-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.txt -E
|
||||
${CMAKE_CURRENT_BINARY_DIR}/extra_counters.yaml -T -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1_extra -o pmc1
|
||||
--output-format csv -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc1 "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-txt-pmc1-extra-counters-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc1}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-pmc1-extra-counters-validate
|
||||
# pmc1 with extra counters
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-txt-pmc1-extra-counters
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1_extra/pmc_1/pmc1_counter_collection.csv
|
||||
)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.txt
|
||||
-E ${CMAKE_CURRENT_BINARY_DIR}/extra_counters.yaml -T -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1_extra -o pmc1 --output-format
|
||||
csv -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-txt-pmc1-extra-counters)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-pmc1-extra-counters-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-txt-pmc1-extra-counters-execute"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-pmc1-extra-counters
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt extra_counters.yaml
|
||||
CONFIG pytest.ini
|
||||
ARGS --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1_extra/pmc_1/pmc1_counter_collection.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-txt-pmc1-extra-counters)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+23
-27
@@ -13,35 +13,31 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.txt)
|
||||
|
||||
# pmc1
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-txt-pmc1-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.txt -T -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1 -o pmc1 --output-format csv
|
||||
json -- $<TARGET_FILE:vector-ops>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc1 "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-txt-pmc1-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc1}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-pmc1-validate
|
||||
# pmc1
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-txt-pmc1
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1/pmc_1/pmc1_counter_collection.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1/pmc_1/pmc1_results.json)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.txt
|
||||
-T -d ${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1 -o pmc1 --output-format
|
||||
csv json -- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-txt-pmc1)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-pmc1-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-txt-pmc1-execute"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-pmc1
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt
|
||||
CONFIG pytest.ini
|
||||
ARGS --input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1/pmc_1/pmc1_counter_collection.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_1/pmc_1/pmc1_results.json
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-txt-pmc1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+27
-33
@@ -10,41 +10,35 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.txt)
|
||||
|
||||
# pmc2
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-txt-pmc2-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.txt --output-format CSV JSON -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o out -- $<TARGET_FILE:simple-transpose>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc2 "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-txt-pmc2-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc2}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-txt-pmc2-execute-validate
|
||||
# pmc2
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-txt-pmc2
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_1/out_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_1/out_counter_collection.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_counter_collection.csv)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.txt
|
||||
--output-format CSV JSON -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o out --
|
||||
$<TARGET_FILE:simple-transpose>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-txt-pmc2)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-txt-pmc2-execute-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-pmc2-execute" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-txt-pmc2
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt
|
||||
CONFIG pytest.ini
|
||||
ARGS --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_1/out_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_1/out_counter_collection.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pmc_2/out_counter_collection.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-txt-pmc2)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+54
-56
@@ -13,66 +13,64 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json input.yml)
|
||||
|
||||
# pmc1
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-json-pmc1-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc
|
||||
-o out_json -f csv -- $<TARGET_FILE:simple-transpose>)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-yaml-pmc1-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.yml -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o
|
||||
out_yaml -f csv -- $<TARGET_FILE:simple-transpose>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc1 "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-json-pmc1-execute
|
||||
rocprofv3-test-counter-collection-yaml-pmc1-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc1}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-json-pmc1-validate
|
||||
# pmc1
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-json-pmc1
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_json_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_json_counter_collection.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_counter_collection.csv
|
||||
)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o
|
||||
out_json -f csv -- $<TARGET_FILE:simple-transpose>
|
||||
DEPENDS simple-transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
ENVIRONMENT "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-json-pmc1)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-json-pmc1-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
rocprofv3-test-counter-collection-json-pmc1-execute
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-json-pmc1
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
ARGS --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_json_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_json_counter_collection.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_json_counter_collection.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-json-pmc1)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-yaml-pmc1-validate
|
||||
# YAML input test
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-yaml-pmc1
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_yaml_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_yaml_counter_collection.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_counter_collection.csv
|
||||
)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.yml
|
||||
-d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o out_yaml -f csv --
|
||||
$<TARGET_FILE:simple-transpose>
|
||||
DEPENDS simple-transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-yaml-pmc1)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-yaml-pmc1-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
rocprofv3-test-counter-collection-yaml-pmc1-execute
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-yaml-pmc1
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
ARGS --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_yaml_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_1/out_yaml_counter_collection.csv
|
||||
--agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/pass_2/out_yaml_counter_collection.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-yaml-pmc1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+92
-97
@@ -10,111 +10,106 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.txt input.json input.yml)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
# pmc1
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-input-json-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-json
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json -d ${CMAKE_CURRENT_BINARY_DIR}/json_input
|
||||
-- $<TARGET_FILE:vector-ops>)
|
||||
-- $<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-kernel-filtering-input-json)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-json
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
DISCOVERY_ARGS -k _pass
|
||||
ARGS --input-csv-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_1/out_counter_collection.csv
|
||||
--input-json-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_1/out_results.json
|
||||
--input-csv-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_2/out_counter_collection.csv
|
||||
--input-json-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_2/out_results.json
|
||||
--input-csv-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_3/out_counter_collection.csv
|
||||
--input-json-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_3/out_results.json
|
||||
--input-csv-pass4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_4/out_counter_collection.csv
|
||||
--input-json-pass4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_4/out_results.json
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-kernel-filtering-input-json)
|
||||
|
||||
set(cc-env-kernel-filtering "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-json-execute
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT
|
||||
"${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-input-cmd-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-cmd
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.txt --kernel-include-regex ".*kernel"
|
||||
--kernel-exclude-regex "multiply" -T -d ${CMAKE_CURRENT_BINARY_DIR}/cmd_input -o
|
||||
out --output-format csv -- $<TARGET_FILE:vector-ops>)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.txt
|
||||
--kernel-include-regex ".*kernel" --kernel-exclude-regex "multiply" -T -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmd_input -o out --output-format csv --
|
||||
$<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-kernel-filtering-input-cmd)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-cmd-execute
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT
|
||||
"${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-cmd
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
DISCOVERY_ARGS -k test_validate_counter_collection_csv_pmc1
|
||||
ARGS --input-csv-pmc1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmd_input/pmc_1/out_counter_collection.csv
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-kernel-filtering-input-cmd)
|
||||
|
||||
# pmc1
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-input-yaml-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-yaml
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.yml -T -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input -o out --output-format csv json --
|
||||
$<TARGET_FILE:vector-ops>)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.yml
|
||||
-T -d ${CMAKE_CURRENT_BINARY_DIR}/yaml_input -o out --output-format csv json --
|
||||
$<TARGET_FILE:vector-ops>
|
||||
DEPENDS vector-ops
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-kernel-filtering-input-yaml)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-yaml-execute
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT
|
||||
"${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-input-json-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py -k _pass
|
||||
--input-csv-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_1/out_counter_collection.csv
|
||||
--input-json-pass1 ${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_1/out_results.json
|
||||
--input-csv-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_2/out_counter_collection.csv
|
||||
--input-json-pass2 ${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_2/out_results.json
|
||||
--input-csv-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_3/out_counter_collection.csv
|
||||
--input-json-pass3 ${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_3/out_results.json
|
||||
--input-csv-pass4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_4/out_counter_collection.csv
|
||||
--input-json-pass4 ${CMAKE_CURRENT_BINARY_DIR}/json_input/pass_4/out_results.json)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-input-yaml-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py -k _pass
|
||||
--input-csv-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_1/out_counter_collection.csv
|
||||
--input-json-pass1 ${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_1/out_results.json
|
||||
--input-csv-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_2/out_counter_collection.csv
|
||||
--input-json-pass2 ${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_2/out_results.json
|
||||
--input-csv-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_3/out_counter_collection.csv
|
||||
--input-json-pass3 ${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_3/out_results.json
|
||||
--input-csv-pass4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_4/out_counter_collection.csv
|
||||
--input-json-pass4 ${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_4/out_results.json)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-input-cmd-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py -k
|
||||
test_validate_counter_collection_csv_pmc1 --input-csv-pmc1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmd_input/pmc_1/out_counter_collection.csv)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-json-validate
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-kernel-filtering-input-json-execute"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-cmd-validate
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-kernel-filtering-input-cmd-execute"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-yaml-validate
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-kernel-filtering-input-yaml-execute"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-yaml
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.txt input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
DISCOVERY_ARGS -k _pass
|
||||
ARGS --input-csv-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_1/out_counter_collection.csv
|
||||
--input-json-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_1/out_results.json
|
||||
--input-csv-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_2/out_counter_collection.csv
|
||||
--input-json-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_2/out_results.json
|
||||
--input-csv-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_3/out_counter_collection.csv
|
||||
--input-json-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_3/out_results.json
|
||||
--input-csv-pass4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_4/out_counter_collection.csv
|
||||
--input-json-pass4
|
||||
${CMAKE_CURRENT_BINARY_DIR}/yaml_input/pass_4/out_results.json
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests" FIXTURES
|
||||
rocprofv3-test-counter-collection-kernel-filtering-input-yaml)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+37
-39
@@ -10,50 +10,48 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY input.json)
|
||||
# basic-metrics
|
||||
add_test(
|
||||
NAME rocprofv3-test-list-avail-execute
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_2 -o metrics --list-avail)
|
||||
|
||||
# list-metrics-stdout
|
||||
add_test(NAME rocprofv3-test-list-avail-std-out-execute
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json)
|
||||
|
||||
# list-metrics with tracing
|
||||
add_test(
|
||||
NAME rocprofv3-test-list-avail-trace-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_2 -o metrics --list-avail
|
||||
--sys-trace --log-level warning -- $<TARGET_FILE:transpose>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-list-metrics "${PRELOAD_ENV}" "ROCPD_LOG_LEVEL=info")
|
||||
rocprofiler_configure_pytest_files(
|
||||
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
CONFIG pytest.ini
|
||||
COPY input.json)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-list-avail-execute
|
||||
PROPERTIES TIMEOUT 60 LABELS "integration-tests" ENVIRONMENT "${cc-env-list-metrics}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
# basic-metrics
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-list-avail
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_2 -o metrics --list-avail
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPD_LOG_LEVEL=info")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-list-avail-std-out-execute
|
||||
PROPERTIES
|
||||
TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${cc-env-list-metrics}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
# list-metrics-stdout
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-list-avail-std-out
|
||||
COMMAND $<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPD_LOG_LEVEL=info"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"GPU:[0-9]*\\n*;Name:\\t[a-zA-Z_]*\\n;counter_name:\\t[a-zA-Z_]*\\n;description:\\t(.*)\\n*;expression:\\t(.)*\\n*;block:\\t[a-zA-Z]*\\n*;dimension_name:\\t([A-Z_]*)\\n*; dimension_instances:\\t([[0-9]*:[0-9]*\\])*\\n*;method:(.*)\\n*;unit:(.*)\\n*;min_interval:[0-9]*\\n*;max_interval:[0-9]*\\n*;flags:(.*)\\n*"
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-list-avail-trace-execute
|
||||
PROPERTIES TIMEOUT 60 LABELS "integration-tests" ENVIRONMENT "${cc-env-list-metrics}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
# list-metrics with tracing
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-list-avail-trace
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_counter_collection_2 -o metrics --list-avail
|
||||
--sys-trace --log-level warning -- $<TARGET_FILE:transpose>
|
||||
DEPENDS transpose
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
ENVIRONMENT "ROCPD_LOG_LEVEL=info")
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+50
-70
@@ -32,81 +32,61 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json input.yml)
|
||||
|
||||
# pmc1
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-multiplex-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc
|
||||
-o out_json -f csv -- $<TARGET_FILE:simple-transpose>)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-multiple-yaml-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.yml -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o
|
||||
out_yaml -f csv -- $<TARGET_FILE:simple-transpose>)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc1 "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-multiplex-execute
|
||||
rocprofv3-test-counter-collection-multiple-yaml-execute
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${cc-env-pmc1}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
TRUE)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-multiplex-validate
|
||||
# JSON input test
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-multiplex
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_counter_collection.csv)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o
|
||||
out_json -f csv -- $<TARGET_FILE:simple-transpose>
|
||||
DEPENDS simple-transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-multiplex
|
||||
UNSTABLE)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-multiplex-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
rocprofv3-test-counter-collection-multiplex-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
TRUE)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-multiplex
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
ARGS --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_json_counter_collection.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-multiplex
|
||||
UNSTABLE)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-multiple-yaml-validate
|
||||
# YAML input test
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-multiple-yaml
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_counter_collection.csv)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i ${CMAKE_CURRENT_BINARY_DIR}/input.yml
|
||||
-d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-cc -o out_yaml -f csv --
|
||||
$<TARGET_FILE:simple-transpose>
|
||||
DEPENDS simple-transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-multiple-yaml
|
||||
UNSTABLE)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-multiple-yaml-validate
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
rocprofv3-test-counter-collection-multiple-yaml-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
TRUE)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-multiple-yaml
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.json input.yml
|
||||
CONFIG pytest.ini
|
||||
ARGS --agent-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_agent_info.csv
|
||||
--counter-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-cc/out_yaml_counter_collection.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-multiple-yaml
|
||||
UNSTABLE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+27
-32
@@ -10,40 +10,35 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input_range.json)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-range-filter-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_range.json -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter -- $<TARGET_FILE:transpose> 1 15)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-kernel-filtering "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-range-filter-execute
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" ENVIRONMENT
|
||||
"${cc-env-kernel-filtering}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-counter-collection-kernel-filtering-range-filter-validate
|
||||
# Range filtering test
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-range-filter
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-config
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_range.json --input-json-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter/pass_1/out_results.json
|
||||
--input-json-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter/pass_2/out_results.json
|
||||
--input-json-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter/pass_3/out_results.json)
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_range.json -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter -- $<TARGET_FILE:transpose> 1 15
|
||||
DEPENDS transpose
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-counter-collection-kernel-filtering-range-filter)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-range-filter-validate
|
||||
PROPERTIES TIMEOUT 120 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-counter-collection-kernel-filtering-range-filter-execute"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-counter-collection-kernel-filtering-range-filter
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input_range.json
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-config
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input_range.json
|
||||
--input-json-pass1
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter/pass_1/out_results.json
|
||||
--input-json-pass2
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter/pass_2/out_results.json
|
||||
--input-json-pass3
|
||||
${CMAKE_CURRENT_BINARY_DIR}/range_filter/pass_3/out_results.json
|
||||
TIMEOUT 120
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-counter-collection-kernel-filtering-range-filter)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -30,53 +30,38 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(hip-stream-display-env "${PRELOAD_ENV}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-hip-stream-display-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-hip-stream-display
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --kernel-rename -s -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%tag%-trace -o out --output-format json pftrace csv
|
||||
--log-level env -- $<TARGET_FILE:hip-streams>)
|
||||
--log-level env -- $<TARGET_FILE:hip-streams>
|
||||
DEPENDS hip-streams
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-hip-stream-display
|
||||
DISABLED $<NOT:$<TARGET_EXISTS:hip-streams>>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hip-stream-display-execute
|
||||
PROPERTIES TIMEOUT
|
||||
60
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${hip-stream-display-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
$<NOT:$<TARGET_EXISTS:hip-streams>>)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-hip-stream-display-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_results.json --pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_results.pftrace
|
||||
--kernel-csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_kernel_trace.csv
|
||||
--memory-copy-csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_memory_copy_trace.csv)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hip-stream-display-validate
|
||||
PROPERTIES TIMEOUT
|
||||
60
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
rocprofv3-test-hip-stream-display-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError"
|
||||
DISABLED
|
||||
$<NOT:$<TARGET_EXISTS:hip-streams>>)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-hip-stream-display
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_results.pftrace
|
||||
--kernel-csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_kernel_trace.csv
|
||||
--memory-copy-csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-trace/out_memory_copy_trace.csv
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-hip-stream-display
|
||||
DISABLED $<NOT:$<TARGET_EXISTS:hip-streams>>)
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -30,54 +30,36 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(hip-stream-env "${PRELOAD_ENV}")
|
||||
set(NUM_THREADS 9)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-hip-streams-per-thread-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-hip-streams-per-thread
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -s -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%tag%-trace -o out --output-format json pftrace csv
|
||||
--log-level env -- $<TARGET_FILE:hip-streams-per-thread> ${NUM_THREADS})
|
||||
--log-level env -- $<TARGET_FILE:hip-streams-per-thread> ${NUM_THREADS}
|
||||
DEPENDS hip-streams-per-thread
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-hip-streams-per-thread
|
||||
DISABLED $<NOT:$<TARGET_EXISTS:hip-streams-per-thread>>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hip-streams-per-thread-execute
|
||||
PROPERTIES TIMEOUT
|
||||
60
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${hip-stream-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
$<NOT:$<TARGET_EXISTS:hip-streams-per-thread>>)
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-hip-streams-per-thread-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-per-thread-trace/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-per-thread-trace/out_results.pftrace
|
||||
--memory-copy-csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-per-thread-trace/out_memory_copy_trace.csv
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hip-streams-per-thread-validate
|
||||
PROPERTIES TIMEOUT
|
||||
60
|
||||
LABELS
|
||||
"integration-tests"
|
||||
DEPENDS
|
||||
rocprofv3-test-hip-streams-per-thread-execute
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError"
|
||||
DISABLED
|
||||
$<NOT:$<TARGET_EXISTS:hip-streams-per-thread>>)
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-hip-streams-per-thread
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-per-thread-trace/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-per-thread-trace/out_results.pftrace
|
||||
--memory-copy-csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hip-streams-per-thread-trace/out_memory_copy_trace.csv
|
||||
TIMEOUT 60
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-hip-streams-per-thread
|
||||
DISABLED $<NOT:$<TARGET_EXISTS:hip-streams-per-thread>>)
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -11,39 +11,34 @@ project(
|
||||
string(REPLACE "LD_PRELOAD=" "--preload;" PRELOAD_ARGS
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(tracing-env "")
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
# hsa multiqueue dependency test
|
||||
add_test(
|
||||
NAME rocprofv3-test-hsa-multiqueue-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-hsa-multiqueue
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --hsa-trace --kernel-trace -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-trace -o out --output-format json csv pftrace
|
||||
${PRELOAD_ARGS} -- $<TARGET_FILE:multiqueue_testapp>)
|
||||
${PRELOAD_ARGS} -- $<TARGET_FILE:multiqueue_testapp>
|
||||
DEPENDS multiqueue_testapp
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_SETUP rocprofv3-test-hsa-multiqueue
|
||||
FAIL_REGULAR_EXPRESSION "HSA_API|HIP_API")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hsa-multiqueue-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${tracing-env}"
|
||||
FAIL_REGULAR_EXPRESSION "HSA_API|HIP_API")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-hsa-multiqueue-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --hsa-trace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_hsa_api_trace.csv
|
||||
--kernel-trace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_kernel_trace.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.pftrace)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hsa-multiqueue-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-hsa-multiqueue-execute" FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-hsa-multiqueue
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --hsa-trace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_hsa_api_trace.csv
|
||||
--kernel-trace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_kernel_trace.csv
|
||||
--json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.pftrace
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-hsa-multiqueue)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -19,10 +19,8 @@ endif()
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(kernel-rename-env "${PRELOAD_ENV}")
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini input-kernel-rename.yml
|
||||
COPY validate.py conftest.py)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/input-kernel-rename.yml.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input-kernel-rename.yml @ONLY)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
@@ -30,8 +28,8 @@ rocprofiler_configure_pytest_files(CONFIG pytest.ini input-kernel-rename.yml
|
||||
#
|
||||
##########################################################################################
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-kernel-rename-cmd-line-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-kernel-rename-cmd-line
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -M --sys-trace no --hsa-trace=0
|
||||
--hsa-core-trace=1 --hip-compiler-trace False --hip-runtime-trace --kernel-trace
|
||||
@@ -39,28 +37,27 @@ add_test(
|
||||
--output-format pftrace json otf2 --log-level env --kernel-rename
|
||||
--perfetto-shmem-size-hint 128 --perfetto-buffer-size 2048000
|
||||
--perfetto-buffer-fill-policy ring_buffer --perfetto-backend inprocess --
|
||||
$<TARGET_FILE:transpose>)
|
||||
$<TARGET_FILE:transpose>
|
||||
DEPENDS transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
ENVIRONMENT "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-kernel-rename-cmd-line)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-kernel-rename-cmd-line-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${kernel-rename-env}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-kernel-rename-cmd-line-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.pftrace
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.otf2)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-kernel-rename-cmd-line-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-kernel-rename-execute" FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-kernel-rename-cmd-line
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.pftrace
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-cmd-line/out_results.otf2
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-kernel-rename-cmd-line)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
@@ -68,29 +65,28 @@ set_tests_properties(
|
||||
#
|
||||
##########################################################################################
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-kernel-rename-inp-yaml-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-kernel-rename-inp-yaml
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input-kernel-rename.yml -- $<TARGET_FILE:transpose>)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input-kernel-rename.yml -- $<TARGET_FILE:transpose>
|
||||
DEPENDS transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-kernel-rename-inp-yaml)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-kernel-rename-inp-yaml-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${kernel-rename-env}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-kernel-rename-inp-yaml-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.pftrace
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.otf2)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-kernel-rename-inp-yaml-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-kernel-rename-inp-yaml-execute" FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-kernel-rename-inp-yaml
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.json
|
||||
--pftrace-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.pftrace
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/transpose-trace-inp-yaml/out_results.otf2
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-kernel-rename-inp-yaml)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -10,39 +10,32 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(memory-allocation-tracing-env "${PRELOAD_ENV}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-memory-allocation-tracing-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-memory-allocation-tracing
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --memory-allocation-trace -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%tag%-trace -o out --output-format json otf2 csv
|
||||
--log-level env -- $<TARGET_FILE:hsa-memory-allocation>)
|
||||
--log-level env -- $<TARGET_FILE:hsa-memory-allocation>
|
||||
DEPENDS hsa-memory-allocation
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-memory-allocation-tracing)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-memory-allocation-tracing-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
|
||||
"${memory-allocation-tracing-env}" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-memory-allocation-tracing-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_results.json
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_results.otf2
|
||||
--csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_memory_allocation_trace.csv
|
||||
)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-memory-allocation-tracing-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
rocprofv3-test-memory-allocation-tracing-execute FAIL_REGULAR_EXPRESSION
|
||||
"AssertionError")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-memory-allocation-tracing
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py
|
||||
CONFIG pytest.ini
|
||||
ARGS --json-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_results.json
|
||||
--otf2-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_results.otf2
|
||||
--csv-input
|
||||
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_memory_allocation_trace.csv
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-memory-allocation-tracing)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
@@ -10,40 +10,34 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json)
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
# pmc2
|
||||
add_test(
|
||||
NAME rocprofv3-test-minimum-bytes-execute
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-minimum-bytes
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.json --output-format csv json pftrace -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-kernel-trace -o out --
|
||||
$<TARGET_FILE:simple-transpose>)
|
||||
$<TARGET_FILE:simple-transpose>
|
||||
DEPENDS simple-transpose
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
FIXTURES_SETUP rocprofv3-test-minimum-bytes)
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(cc-env-pmc2 "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-minimum-bytes-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc2}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-minimum-bytes-validate
|
||||
COMMAND
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --trace-input-csv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-kernel-trace/out*.csv
|
||||
--trace-input-json
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-kernel-trace/out_results.json
|
||||
--trace-input-pftrace
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-kernel-trace/out_results.pftrace)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-minimum-bytes-validate
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
"rocprofv3-test-minimum-bytes-execute" FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
rocprofiler_add_integration_validate_test(
|
||||
rocprofv3-test-minimum-bytes
|
||||
TEST_PATHS validate.py
|
||||
COPY conftest.py input.json
|
||||
CONFIG pytest.ini
|
||||
ARGS --trace-input-csv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-kernel-trace/out*.csv
|
||||
--trace-input-json
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-kernel-trace/out_results.json
|
||||
--trace-input-pftrace
|
||||
${CMAKE_CURRENT_BINARY_DIR}/simple-transpose-kernel-trace/out_results.pftrace
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
FIXTURES_REQUIRED rocprofv3-test-minimum-bytes)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
[pytest]
|
||||
addopts = --durations=20 -rA -s -vv
|
||||
addopts = --durations=20 -rA -s
|
||||
testpaths = validate.py
|
||||
pythonpath = @ROCPROFILER_SDK_TESTS_BINARY_DIR@/pytest-packages
|
||||
|
||||
+19
-35
@@ -35,9 +35,9 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
set(negate-aggregate-tracing-options-env "${PRELOAD_ENV}")
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG input-negate-aggregate-tracing-options.yml)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/input-negate-aggregate-tracing-options.yml.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input-negate-aggregate-tracing-options.yml @ONLY)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
@@ -45,8 +45,8 @@ rocprofiler_configure_pytest_files(CONFIG input-negate-aggregate-tracing-options
|
||||
#
|
||||
##########################################################################################
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-negate-aggregate-tracing-options-cmd-line
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-negate-aggregate-tracing-options-cmd-line
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -M --sys-trace -d
|
||||
${CMAKE_CURRENT_BINARY_DIR} -o out --log-level info --hip-trace=no --hsa-trace=no
|
||||
@@ -55,20 +55,12 @@ add_test(
|
||||
--kokkos-trace=no --rocdecode-trace=no --rocjpeg-trace=no --hip-runtime-trace=no
|
||||
--hip-compiler-trace=no --hsa-core-trace=no --hsa-amd-trace=no
|
||||
--hsa-image-trace=no --hsa-finalizer-trace=no --advanced-thread-trace=no
|
||||
--kernel-rename=no --summary --echo -- ${CMAKE_COMMAND})
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-negate-aggregate-tracing-options-cmd-line
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${negate-aggregate-tracing-options-env}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"command:.*${CMAKE_COMMAND}"
|
||||
WILL_FAIL
|
||||
ON)
|
||||
--kernel-rename=no --summary --echo -- ${CMAKE_COMMAND}
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
WILL_FAIL)
|
||||
|
||||
##########################################################################################
|
||||
#
|
||||
@@ -76,22 +68,14 @@ set_tests_properties(
|
||||
#
|
||||
##########################################################################################
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-negate-aggregate-tracing-options-inp-yaml
|
||||
rocprofiler_add_integration_execute_test(
|
||||
rocprofv3-test-negate-aggregate-tracing-options-inp-yaml
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input-negate-aggregate-tracing-options.yml --
|
||||
${CMAKE_COMMAND})
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-negate-aggregate-tracing-options-inp-yaml
|
||||
PROPERTIES TIMEOUT
|
||||
45
|
||||
LABELS
|
||||
"integration-tests"
|
||||
ENVIRONMENT
|
||||
"${negate-aggregate-tracing-options-env}"
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"command:.*${CMAKE_COMMAND}"
|
||||
WILL_FAIL
|
||||
ON)
|
||||
${CMAKE_COMMAND}
|
||||
DEPENDS rocprofiler-sdk::rocprofv3
|
||||
TIMEOUT 45
|
||||
LABELS "integration-tests"
|
||||
PRELOAD "${PRELOAD_ENV}"
|
||||
WILL_FAIL)
|
||||
|
||||
Alguns ficheiros não foram mostrados porque foram modificados demasiados ficheiros neste diff Mostrar mais
Criar uma nova questão referindo esta
Bloquear um utilizador