ef71cc38c1
* Fix init order for getMetricIdMap Ensure that getMetricIdMap() stays valid until the destruction of the counting service. Adds a test to ensure that this behavior is maintained (this test fails without this change). * source formatting (clang-format v11) (#343) Co-authored-by: bwelton <bwelton@users.noreply.github.com> * cmake formatting (cmake-format) (#342) Co-authored-by: bwelton <bwelton@users.noreply.github.com> * Remove threading * Update usage of rocprofiler::counters::get{Metric,MetricId}Map() - uses common::static_object * Update counter init_order testing --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bwelton <bwelton@users.noreply.github.com> Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
24 lines
789 B
CMake
24 lines
789 B
CMake
rocprofiler_deactivate_clang_tidy()
|
|
|
|
include(GoogleTest)
|
|
|
|
set(ROCPROFILER_LIB_COUNTER_TEST_SOURCES metrics_test.cpp evaluate_ast_test.cpp
|
|
dimension.cpp init_order.cpp)
|
|
|
|
add_executable(counter-test)
|
|
|
|
target_sources(counter-test PRIVATE ${ROCPROFILER_LIB_COUNTER_TEST_SOURCES})
|
|
|
|
target_link_libraries(
|
|
counter-test
|
|
PRIVATE rocprofiler::rocprofiler-hip rocprofiler::rocprofiler-common-library
|
|
rocprofiler::rocprofiler-static-library 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")
|