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

Commit 4e452bac authored by Jack He's avatar Jack He
Browse files

MCAP: Add a test tool for MCAP

* Add a command line tool for MCAP related tests
* This tool can access the Bluetooth stack via a command line program
* Type "help" to obtain a list of available console commands in this
  Bluetooth
* Bluetooth must be disabled when this tool is running

Bug: 37867299
Test: make, PTS MCAP test
Change-Id: I106e6625ee8a29b7fdad88cdfeb99419054ef771
parent 9a03c88c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,4 +15,5 @@ subdirs = [
    "vendor_libs",
    "test",
    "udrv",
    "tools",
]
+7 −0
Original line number Diff line number Diff line
@@ -39,3 +39,10 @@ group("bluetooth_tests") {
    "//device:net_test_device",
  ]
}

group("test_tools") {
  testonly = true
  deps = [
    "//tools/mcap_tool:mcap_tool"
  ]
}
+18 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */
subdirs = [
    "mcap_tool",
]
+42 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */
cc_binary {
    name: "mcap_tool",
    defaults : ["fluoride_defaults"],
    srcs: [
      "mcap_test_app.cc",
      "mcap_test_mcl.cc",
      "mcap_test_mdep.cc",
      "mcap_test_mdl.cc",
      "mcap_tool.cc",
    ],
    include_dirs: [
      "packages/modules/Bluetooth/system",
      "packages/modules/Bluetooth/system/include",
      "packages/modules/Bluetooth/system/stack/include",
      "packages/modules/Bluetooth/system/btcore/include",
    ],
    tags: ["debug", "optional"],
    shared_libs: [
      "libcutils",
      "libutils",
      "libhardware",
    ],
    static_libs: [
      "libbtcore",
      "libosi",
    ]
}
+43 −0
Original line number Diff line number Diff line
#
#  Copyright (C) 2017 Google, Inc.
#
#  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.
#
executable("mcap_tool") {
  testonly = true
  sources = [
    "mcap_tool.cc",
    "mcap_test_app.cc",
    "mcap_test_mcl.cc",
    "mcap_test_mdep.cc",
    "mcap_test_mdl.cc",
  ]
  include_dirs = [
    "//",
    "//include",
    "//stack/include",
    "//btif/include",
    "//btcore/include",
    "//tools/mcap_tool",
  ]
  libs = [
    "-lpthread",
    "-lrt",
    "-ldl",
  ]
  deps = [
    "//btcore",
    "//osi",
    "//third_party/libchrome:base",
  ]
}
Loading