[CI] Fix code coverage and thread sanitizer workflows (#378)
* Fix code coverage workflow
* Relocate rocprofv3 conversion test script + rename tests
- these are rocprofv3 tests and were not properly located and not properly named
* Fix thread sanitizer
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
[ROCm/rocprofiler-sdk commit: 4f03ebc360]
这个提交包含在:
@@ -478,7 +478,7 @@ jobs:
|
||||
$(get-base-md-contents samples)
|
||||
|
||||
## Tests + Samples
|
||||
$(get-full-md-contents all)
|
||||
$(get-base-md-contents all)
|
||||
|
||||
<!-- code-coverage-comment-identifier -->
|
||||
EOF
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
#define ROCPROFV3_PUBLIC_API __attribute__((visibility("default")));
|
||||
#define ROCPROFV3_INTERNAL_API __attribute__((visibility("internal")));
|
||||
|
||||
#if defined(__has_feature)
|
||||
# if __has_feature(thread_sanitizer)
|
||||
# define ROCPROFV3_THREAD_SANITIZER 1
|
||||
# endif
|
||||
#elif defined(__SANITIZE_THREAD__)
|
||||
# define ROCPROFV3_THREAD_SANITIZER 1
|
||||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
@@ -65,10 +73,13 @@ __libc_start_main(int (*)(int, char**, char**),
|
||||
sighandler_t
|
||||
signal(int signum, sighandler_t handler) ROCPROFV3_PUBLIC_API;
|
||||
|
||||
#if !defined(ROCPROFV3_THREAD_SANITIZER)
|
||||
// breaks thread sanitizer
|
||||
int
|
||||
sigaction(int signum,
|
||||
const struct sigaction* restrict act,
|
||||
struct sigaction* restrict oldact) ROCPROFV3_PUBLIC_API;
|
||||
#endif
|
||||
|
||||
extern void
|
||||
rocprofv3_set_main(main_func_t main_func) ROCPROFV3_INTERNAL_API;
|
||||
|
||||
@@ -77,7 +77,6 @@ add_subdirectory(counter-collection)
|
||||
add_subdirectory(openmp-tools)
|
||||
add_subdirectory(rocdecode)
|
||||
add_subdirectory(rocjpeg)
|
||||
add_subdirectory(conversion-script)
|
||||
|
||||
# rocprofv3 validation tests
|
||||
add_subdirectory(rocprofv3)
|
||||
|
||||
@@ -45,3 +45,4 @@ add_subdirectory(hip-stream-display)
|
||||
add_subdirectory(agent-index)
|
||||
add_subdirectory(negate-aggregate-tracing-options)
|
||||
add_subdirectory(minimum-bytes)
|
||||
add_subdirectory(conversion-script)
|
||||
|
||||
+8
-8
@@ -24,7 +24,7 @@
|
||||
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
||||
|
||||
project(
|
||||
rocprofiler-sdk-tests-conversion-script
|
||||
rocprofiler-sdk-tests-rocprofv3-conversion-script
|
||||
LANGUAGES CXX
|
||||
VERSION 0.0.0)
|
||||
|
||||
@@ -34,7 +34,7 @@ rocprofiler_configure_pytest_files(COPY validate.py input.txt conftest.py
|
||||
CONFIG pytest.ini)
|
||||
|
||||
add_test(
|
||||
NAME test-conversion-script-execute
|
||||
NAME rocprofv3-test-conversion-script-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/input.txt -T -d
|
||||
@@ -47,15 +47,15 @@ string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
|
||||
set(cc-env-pmc "${PRELOAD_ENV}")
|
||||
|
||||
set_tests_properties(
|
||||
test-conversion-script-execute
|
||||
rocprofv3-test-conversion-script-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT "${cc-env-pmc}"
|
||||
FAIL_REGULAR_EXPRESSION "${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
|
||||
set(convert_tests test-conversion-script-convert-no-agent-prefix
|
||||
test-conversion-script-convert-agent-prefix)
|
||||
set(convert_tests rocprofv3-test-conversion-script-convert-no-agent-prefix
|
||||
rocprofv3-test-conversion-script-convert-agent-prefix)
|
||||
|
||||
set(validate_tests test-conversion-script-validate-no-agent-prefix
|
||||
test-conversion-script-validate-agent-prefix)
|
||||
set(validate_tests rocprofv3-test-conversion-script-validate-no-agent-prefix
|
||||
rocprofv3-test-conversion-script-validate-agent-prefix)
|
||||
|
||||
set(output_dir ${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script_no_agent_prefix
|
||||
${CMAKE_CURRENT_BINARY_DIR}/out_conversion_script_agent_prefix)
|
||||
@@ -100,7 +100,7 @@ foreach(i RANGE 0 ${convert_test_length})
|
||||
set_tests_properties(
|
||||
${test_name}
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
|
||||
test-conversion-script-execute FAIL_REGULAR_EXPRESSION
|
||||
rocprofv3-test-conversion-script-execute FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
set_tests_properties(
|
||||
${validate_test_name}
|
||||
在新工单中引用
屏蔽一个用户