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

Commit 156cd3f8 authored by Myles Watson's avatar Myles Watson Committed by Gerrit Code Review
Browse files

Merge "InitFlags: Remove SetAllForTesting" into main

parents e6ab1fe7 eb1f26e4
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@

#include "bta/av/bta_av_int.h"
#include "bta/hf_client/bta_hf_client_int.h"
#include "common/init_flags.h"
#include "test/common/mock_functions.h"
#include "test/mock/mock_osi_alarm.h"
#include "test/mock/mock_stack_acl.h"
@@ -40,10 +39,7 @@ struct alarm_t {

class BtaAvTest : public testing::Test {
protected:
  void SetUp() override {
    reset_mock_function_count_map();
    bluetooth::common::InitFlags::SetAllForTesting();
  }
  void SetUp() override { reset_mock_function_count_map(); }
  void TearDown() override {}
};

+0 −2
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
#include "bta/include/bta_ag_api.h"
#include "bta/include/bta_hh_api.h"
#include "btcore/include/module.h"
#include "common/init_flags.h"
#include "include/hardware/bt_hh.h"
#include "test/common/core_interface.h"
#include "test/common/mock_functions.h"
@@ -147,7 +146,6 @@ class BtifHhWithHalCallbacksTest : public BtifHhWithMockTest {
protected:
  void SetUp() override {
    BtifHhWithMockTest::SetUp();
    bluetooth::common::InitFlags::SetAllForTesting();
    g_thread_evt_promise = std::promise<bt_cb_thread_evt>();
    auto future = g_thread_evt_promise.get_future();
    bt_callbacks.thread_evt_cb = [](bt_cb_thread_evt evt) { g_thread_evt_promise.set_value(evt); };
+0 −2
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@ public:
  }

  inline static int GetAdapterIndex() { return init_flags::get_hci_adapter(); }

  inline static void SetAllForTesting() { init_flags::set_all_for_testing(); }
};

}  // namespace common
+0 −5
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@

#include <csignal>
#include <cstring>
#include <memory>
#include <optional>
#include <string>
#include <thread>
@@ -32,11 +31,9 @@
#include <unwindstack/AndroidUnwinder.h>
// clang-format on

#include "common/init_flags.h"
#include "facade/grpc_root_server.h"
#include "hal/hci_hal_host.h"
#include "hal/snoop_logger.h"
#include "os/log.h"
#include "os/parameter_provider.h"
#include "os/system_properties.h"

@@ -117,8 +114,6 @@ int main(int argc, const char** argv) {
  int root_server_port = 8897;
  int grpc_port = 8899;

  bluetooth::common::InitFlags::SetAllForTesting();

  const std::string arg_grpc_root_server_port = "--root-server-port=";
  const std::string arg_grpc_server_port = "--grpc-port=";
  const std::string arg_rootcanal_port = "--rootcanal-port=";
+0 −1
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ PacketView<kLittleEndian> GetPacketView(std::unique_ptr<packet::BasePacketBuilde
class ClassicImplTest : public ::testing::Test {
protected:
  void SetUp() override {
    bluetooth::common::InitFlags::SetAllForTesting();
    thread_ = new Thread("thread", Thread::Priority::NORMAL);
    handler_ = new Handler(thread_);
    hci_layer_ = new HciLayerFake();
Loading