diff --git a/test/auto-pts/btpclient.c b/test/auto-pts/btpclient.c index 704987d28..cc4a067dd 100644 --- a/test/auto-pts/btpclient.c +++ b/test/auto-pts/btpclient.c @@ -54,10 +54,6 @@ #include "btp.h" #include "btp_socket.h" -#ifdef COVERAGE -#include -#endif - #define AUTOPTS_SOCKET_NAME "/tmp/bt-stack-tester" #define BT_LE_AD_LIMITED (1U << 0) diff --git a/test/security_manager_sc/sm_test.c b/test/security_manager_sc/sm_test.c index 16b6471fc..3af73ca7e 100644 --- a/test/security_manager_sc/sm_test.c +++ b/test/security_manager_sc/sm_test.c @@ -64,8 +64,8 @@ #include "btstack_stdin.h" #ifdef COVERAGE -// guesswork: -void __gcov_flush(void); +void __gcov_dump(void); +void __gcov_reset(void); #endif #define HEARTBEAT_PERIOD_MS 1000 @@ -458,7 +458,8 @@ static void stdin_process(char c){ case 'x': #ifdef COVERAGE log_info("Flush gcov"); - __gcov_flush(); + __gcov_dump(); + __gcov_reset(); #endif printf("EXIT\n"); exit(0);