Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45caa7ea authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge changes Iac195660,I427cb6cf,I21cff50f,I4a1e7ee7

* changes:
  unittest: main:: Use common log msg
  unittest: stack:: Use common log msg
  unittest: btif:: Use common log msg
  unittest: bta:: Use common log msg
parents 01d19e52 58d8d027
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ cc_test {
    test_suites: ["device-tests"],
    srcs: [
        ":TestMockStackBtm",
        ":TestCommonLogMsg",
        ":TestCommonMockFunctions",
        "test/bta_hf_client_test.cc",
        "test/bta_dm_cust_uuid_test.cc",
@@ -327,6 +328,7 @@ cc_test {
        "packages/modules/Bluetooth/system/utils/include",
    ],
    srcs: [
        ":TestCommonLogMsg",
        "test/bta_hf_client_add_record_test.cc",
    ],
    header_libs: ["libbluetooth_headers"],
@@ -933,6 +935,7 @@ cc_test {
    ],
    srcs : [
        ":TestMockMainShim",
        ":TestCommonLogMsg",
        ":TestCommonMainHandler",
        ":TestCommonMockFunctions",
        ":TestMockBtaGatt",
+0 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ static uint16_t gVersion;
// coverage is enabled because the compiler is unable to eliminate the `if`
// checks against appl_trace_level in APPL_TRACE_* macros.
uint8_t appl_trace_level = 0;
void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
bool SDP_AddProtocolList(uint32_t handle, uint16_t num_elem,
                         tSDP_PROTOCOL_ELEM* p_elem_list) {
  return false;
+0 −4
Original line number Diff line number Diff line
@@ -34,10 +34,6 @@ const RawAddress bdaddr1({0x11, 0x22, 0x33, 0x44, 0x55, 0x66});
const RawAddress bdaddr2({0x66, 0x55, 0x44, 0x33, 0x22, 0x11});
}  // namespace

// TODO(jpawlowski): there is some weird dependency issue in tests, and the
// tests here fail to compile without this definition.
void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}

class BtaHfClientTest : public testing::Test {
 protected:
  void SetUp() override {
+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#include "test/mock/mock_osi_allocator.h"

uint8_t appl_trace_level = 0;
void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
uint8_t btif_trace_level = BT_TRACE_LEVEL_DEBUG;

namespace {
+2 −0
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ cc_test {
    },
    include_dirs: btifCommonIncludes,
    srcs: [
        ":TestCommonLogMsg",
        "test/btif_rc_test.cc",
    ],
    header_libs: ["libbluetooth_headers"],
@@ -425,6 +426,7 @@ cc_test {
    test_suites: ["device-tests"],
    include_dirs: btifCommonIncludes,
    srcs: [
        ":TestCommonLogMsg",
        "test/btif_hf_client_service_test.cc",
    ],
    header_libs: ["libbluetooth_headers"],
Loading