[rocprofiler-systems] Implement GTest/GMock integration for unit testing (#1777)

* googletest project set up

---------

Co-authored-by: Aleksandar Djordjevic <adjordje@amd.com>
Co-authored-by: Milan Radosavljevic <milan.radosavljevic@amd.com>
Этот коммит содержится в:
Aleksandar Djordjevic
2025-11-24 11:49:30 +01:00
коммит произвёл GitHub
родитель 0580e2053c
Коммит a5d554b85a
11 изменённых файлов: 284 добавлений и 124 удалений
+31
Просмотреть файл
@@ -0,0 +1,31 @@
# MIT License
#
# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
add_executable(rocprof-sys-unit-tests dummy.cpp)
target_link_libraries(
rocprof-sys-unit-tests
PRIVATE rocprofiler-systems-googletest-library
)
include(GoogleTest)
gtest_discover_tests(rocprof-sys-unit-tests)
+3
Просмотреть файл
@@ -0,0 +1,3 @@
#include <gtest/gtest.h>
TEST(first, test) { ASSERT_TRUE(true); }