Separate gcc version for gcov 91/318291/1 accepted/tizen/unified/20240930.043755 accepted/tizen/unified/toolchain/20241004.101743 accepted/tizen/unified/x/20240930.091212 accepted/tizen/unified/x/asan/20241014.000115
authorJaehyun Kim <jeik01.kim@samsung.com>
Thu, 26 Sep 2024 11:06:38 +0000 (20:06 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Thu, 26 Sep 2024 11:06:38 +0000 (20:06 +0900)
Change-Id: I0174507960b2c13d710ac3adf7c0a75309b6bc10
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
gtest/gtest-inm-mgr-unittest.cpp
include/inm-manager-log.h
src/inm-manager-main.c

index 8c3b6c57facd321247e421a0bb6b4672a422fc48..6ed6441092a520c4b9f16fb1ba940163a83bec16 100644 (file)
@@ -36,8 +36,16 @@ using ::testing::TestPartResult;
 using ::testing::UnitTest;
 
 #ifdef TIZEN_TEST_GCOV
+#if (defined(__GNUC__) \
+               && ((__GNUC__ == 11 && __GNUC_MINOR__ >= 1) || (__GNUC__ >= 12))) \
+               || (defined(__clang__) && (__clang_major__ >= 12))
+extern "C" void __gcov_dump(void);
+extern "C" void __gcov_reset(void);
+#define __gcov_flush() do { __gcov_dump(); __gcov_reset(); } while (0)
+#else
 extern "C" void __gcov_flush(void);
 #endif
+#endif
 
 //LCOV_EXCL_START
 TEST(InmMgrWifi, getConnectedAp_p)
index c570e8e6563002fd99b9ac8f80276216ae6c0c7a..fabfff0fa376f0151d85595717bdabe21f7d5c89 100644 (file)
@@ -32,7 +32,16 @@ extern "C" {
 #endif
 
 #ifdef TIZEN_TEST_GCOV
-       void __gcov_flush(void);
+#if (defined(__GNUC__) \
+               && ((__GNUC__ == 11 && __GNUC_MINOR__ >= 1) || (__GNUC__ >= 12))) \
+               || (defined(__clang__) && (__clang_major__ >= 12))
+extern void __gcov_dump(void);
+extern void __gcov_reset(void);
+#define __gcov_flush() do { __gcov_dump(); __gcov_reset(); } while (0)
+#else
+extern void __gcov_flush(void);
+#endif
+
 #define GCOV_FLUSH() \
        do { \
                __gcov_flush();\
index f511c0328b64bc373e5755d677942585cd3be602..5213a61c7064db54f958f0a7b84779245598b502 100644 (file)
 #include "inm-util.h"
 #include "inm-manager-log.h"
 
-#ifdef TIZEN_TEST_GCOV
-void __gcov_flush(void);
-#endif
-
 static GMainLoop *g_loop = NULL;
 
 static void __signal_handler(int sig)