Comhaid
rocm-systems/tests/rocprofv3/aborted-app/CMakeLists.txt
T
SrirakshaNag 94b5d9be3f Adding changes for handling abort signals (#979)
* Adding changes for handling abort signals

* Fix the test failure

* Fixing CmakeLists error

* Addressing review comments

* fixing warnings

* fixing execute test

* Fixing abort app test

* Address review comments

* Apply suggestions from code review

* Apply suggestions from code review

* Fixes for testing issues

* Adding kernel filtering test

* Removing text input file

* fix formatting issues

* misc fix

* Suppress signal-unsafe error in ThreadSanitizer

- rename signal handler to rocprofv3_error_signal_handler to ensure specific filtering

* Fix rocprofv3 aborted-app validation

---------

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2024-08-01 09:16:01 +05:30

45 línte
1.5 KiB
CMake

#
# rocprofv3 tool test
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
project(
rocprofiler-tests-aborted-app
LANGUAGES CXX
VERSION 0.0.0)
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}")
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
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)
set_tests_properties(
rocprofv3-test-execute-app-abort
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${aborted-app-env}"
WILL_FAIL TRUE)
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/pass_1/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}")