OSDN Git Service

Revert "Introduce net_test_stack_btm"
authorMarco Ballesio <balejs@google.com>
Tue, 1 Dec 2020 00:37:48 +0000 (00:37 +0000)
committerMarco Ballesio <balejs@google.com>
Tue, 1 Dec 2020 00:37:48 +0000 (00:37 +0000)
Revert submission 1512835

Reason for revert: DroidMonitor-triggered revert due to breakages:

https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=aosp_cf_x86_phone-userdebug&lkgb=7002541&lkbb=7002623&fkbb=7002623
https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=sdk_x86_64-sdk&lkgb=7002541&lkbb=7002623&fkbb=7002623
https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=full-eng&lkgb=7002541&lkbb=7002623&fkbb=7002623
https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=aosp_cf_x86_64_phone-userdebug&lkgb=7002434&lkbb=7002649&fkbb=7002649
https://android-build.googleplex.com/builds/quarterdeck?branch=git_rvc-d1-dev-plus-aosp&target=aosp_cf_x86_phone-userdebug&lkgb=7002643&lkbb=7002696&fkbb=7002696
https://android-build.googleplex.com/builds/quarterdeck?branch=git_rvc-d1-dev-plus-aosp&target=docs&lkgb=7002604&lkbb=7002703&fkbb=7002696

bug http://b/174517408
Reverted Changes:
Ieb002c783:Canonicalize include files
I69d5dff4f:enum-ify fixed_cid stack/include/l2cdefs::L2CAP_
I5a52498ad:Introduce net_test_stack_btm
I6a637b5e2:Explicit use base::Location stack/btu/btu_hcif::
I23c831a61:Add various stack/test/common/mock_

Change-Id: Id0a3ef185f16f8e229923f684ae12d88082e4b66

stack/Android.bp
stack/test/btm/stack_btm_test.cc [deleted file]

index 315bb1a..bc3c27b 100644 (file)
@@ -609,89 +609,3 @@ cc_test {
         cfi: false,
     },
 }
-
-cc_test {
-    name: "net_test_stack_btm",
-    test_suites: ["device-tests"],
-    host_supported: true,
-    defaults: ["fluoride_defaults"],
-    local_include_dirs: [
-        "include",
-        "btm",
-        "test/common",
-    ],
-    include_dirs: [
-        "system/bt",
-        "system/bt/vnd/ble",
-    ],
-    srcs: crypto_toolbox_srcs + [
-        "acl/ble_acl.cc",
-        "acl/btm_acl.cc",
-        "acl/btm_ble_connection_establishment.cc",
-        "acl/btm_pm.cc",
-        "btm/ble_advertiser_hci_interface.cc",
-        "btm/btm_ble.cc",
-        "btm/btm_ble_addr.cc",
-        "btm/btm_ble_adv_filter.cc",
-        "btm/btm_ble_batchscan.cc",
-        "btm/btm_ble_bgconn.cc",
-        "btm/btm_ble_gap.cc",
-        "btm/btm_ble_multi_adv.cc",
-        "btm/btm_ble_privacy.cc",
-        "btm/btm_dev.cc",
-        "btm/btm_devctl.cc",
-        "btm/btm_inq.cc",
-        "btm/btm_iso.cc",
-        "btm/btm_main.cc",
-        "btm/btm_sco.cc",
-        "btm/btm_sec.cc",
-        "test/btm/stack_btm_test.cc",
-        "test/common/mock_bta_dm_act.cc",
-        "test/common/mock_bta_sys_conn.cc",
-        "test/common/mock_btif_dm.cc",
-        "test/common/mock_btif_storage.cc",
-        "test/common/mock_btu_hcif.cc",
-        "test/common/mock_gap_gap_ble.cc",
-        "test/common/mock_gatt_connection_manager.cc",
-        "test/common/mock_gatt_gatt_auth.cc",
-        "test/common/mock_gatt_main.cc",
-        "test/common/mock_hci_packet_parser.cc",
-        "test/common/mock_hcic_hciblecmds.cc",
-        "test/common/mock_hcic_hcicmds.cc",
-        "test/common/mock_l2cap_l2c_api.cc",
-        "test/common/mock_l2cap_l2c_ble.cc",
-        "test/common/mock_l2cap_l2c_link.cc",
-        "test/common/mock_l2cap_l2c_main.cc",
-        "test/common/mock_l2cap_l2c_utils.cc",
-        "test/common/mock_main_bte_main.cc",
-        "test/common/mock_main_shim.cc",
-        "test/common/mock_main_shim_acl_api.cc",
-        "test/common/mock_main_shim_l2c_api.cc",
-        "test/common/mock_main_shim_btm_api.cc",
-        "test/common/mock_main_shim_controller.cc",
-        "test/common/mock_smp_smp_act.cc",
-        "test/common/mock_smp_smp_api.cc",
-    ],
-    static_libs: [
-        "libbt-common",
-        "libbt-protos-lite",
-        "libgmock",
-        "liblog",
-        "libosi",
-        "libbtdevice",
-    ],
-    shared_libs: [
-        "libprotobuf-cpp-lite",
-        "libcrypto",
-    ],
-    sanitize: {
-        address: true,
-        all_undefined: true,
-        cfi: true,
-        integer_overflow: true,
-        scs: true,
-        diag: {
-            undefined : true
-        },
-    },
-}
diff --git a/stack/test/btm/stack_btm_test.cc b/stack/test/btm/stack_btm_test.cc
deleted file mode 100644 (file)
index 92fc9b2..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- *  Copyright 2020 The Android Open Source Project
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at:
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-#include <map>
-
-#include "hci/include/hci_layer.h"
-#include "hci/include/hci_packet_factory.h"
-#include "internal_include/stack_config.h"
-#include "osi/include/osi.h"
-#include "stack/btm/btm_int.h"
-#include "stack/btm/btm_int_types.h"
-
-base::MessageLoop* get_main_message_loop() { return nullptr; }
-
-const hci_packet_factory_t* hci_packet_factory_get_interface() {
-  return nullptr;
-}
-const hci_t* hci_layer_get_interface() { return nullptr; }
-
-bt_status_t do_in_main_thread(const base::Location& from_here,
-                              base::OnceClosure task) {
-  return BT_STATUS_SUCCESS;
-}
-void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
-
-const std::string kSmpOptions("mock smp options");
-
-bool get_trace_config_enabled(void) { return false; }
-bool get_pts_avrcp_test(void) { return false; }
-bool get_pts_secure_only_mode(void) { return false; }
-bool get_pts_conn_updates_disabled(void) { return false; }
-bool get_pts_crosskey_sdp_disable(void) { return false; }
-const std::string* get_pts_smp_options(void) { return &kSmpOptions; }
-int get_pts_smp_failure_case(void) { return 123; }
-config_t* get_all(void) { return nullptr; }
-
-stack_config_t mock_stack_config{
-    .get_trace_config_enabled = get_trace_config_enabled,
-    .get_pts_avrcp_test = get_pts_avrcp_test,
-    .get_pts_secure_only_mode = get_pts_secure_only_mode,
-    .get_pts_conn_updates_disabled = get_pts_conn_updates_disabled,
-    .get_pts_crosskey_sdp_disable = get_pts_crosskey_sdp_disable,
-    .get_pts_smp_options = get_pts_smp_options,
-    .get_pts_smp_failure_case = get_pts_smp_failure_case,
-    .get_all = get_all,
-};
-const stack_config_t* stack_config_get_interface(void) {
-  return &mock_stack_config;
-}
-
-std::map<std::string, int> mock_function_count_map;
-
-namespace {
-
-using testing::_;
-using testing::DoAll;
-using testing::NotNull;
-using testing::Pointee;
-using testing::Return;
-using testing::SaveArg;
-using testing::SaveArgPointee;
-using testing::StrEq;
-using testing::StrictMock;
-using testing::Test;
-
-class StackBtmTest : public Test {
- public:
- protected:
-  void SetUp() override {}
-  void TearDown() override {}
-};
-
-TEST_F(StackBtmTest, GlobalLifecycle) {
-  btm_init();
-  btm_free();
-}
-
-TEST_F(StackBtmTest, DynamicLifecycle) {
-  auto* btm = new tBTM_CB();
-  delete btm;
-}
-
-}  // namespace