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

Commit f36760dd authored by Michał Narajowski's avatar Michał Narajowski
Browse files

device_iot_config: add unit tests

This patch provides unit tests for the public and
internal methods of the device_iot_config feature.

The callers of this API are not tested.

Bug: 261319328
Tag: #feature
Test: atest bluetooth_test_gd
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I3e7ee29bba0746d66e77872eb96b6c3e60be0b74
parent d1fdfb01
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@
    {
      "name": "net_test_device"
    },
    {
      "name": "net_test_device_iot_config"
    },
    {
      "name": "net_test_gatt_conn_multiplexing"
    },
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ if (defined(use.android) && use.android) {
  group("android_bluetooth_tests") {
    deps = [
      "//bt/system/device:net_test_device",
      "//bt/system/device:net_test_device_iot_config",
      "//bt/system/hci:net_test_hci",
      "//bt/system/osi:net_test_osi",
      "//bt/system/test/suite:net_test_bluetooth",
+32 −0
Original line number Diff line number Diff line
@@ -57,3 +57,35 @@ cc_test {
        "libbluetooth-types",
    ],
}

// Bluetooth device unit tests for target
cc_test {
    name: "net_test_device_iot_config",
    test_suites: ["device-tests"],
    defaults: [
        "fluoride_defaults",
        "mts_defaults",
    ],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/device/src",
    ],
    srcs: [
        ":TestMockOsi",
        "test/device_iot_config_test.cc",
    ],
    shared_libs: [
        "android.hardware.bluetooth@1.0",
        "android.hardware.bluetooth@1.1",
        "liblog",
        "libdl",
    ],
    static_libs: [
        "libbtdevice",
        "libbtcore",
        "libgmock",
        "libosi-AllocationTestHarness",
        "libbluetooth-types",
    ],
}
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
@@ -59,6 +59,32 @@ if (use.test) {
      "//bt/system:target_defaults",
    ]

    libs = [
      "pthread",
      "rt",
      "dl",
    ]
  }
  executable("net_test_device_iot_config") {
    sources = [
      "//bt/system/osi/test/AllocationTestHarness.cc",
    ]

    include_dirs = [
      "//bt/system",
      "//bt/system/stack/include",
      "//bt/system/device/src",
    ]

    deps = [
      "//bt/system/device",
      "//bt/system/btcore",
    ]

    configs += [
      "//bt/system:target_defaults",
    ]

    libs = [
      "pthread",
      "rt",
+3547 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading