summaryrefslogtreecommitdiff
path: root/framework/tests/bumble/Android.bp
blob: 7d41a8ffeeaaf6b1e78b6613d2e009f91ec9a259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "system_bt_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["system_bt_license"],
}

android_test_helper_app {
    name: "BumbleBluetoothTestsApp",
    defaults: ["framework-bluetooth-tests-defaults"],

    min_sdk_version: "current",
    target_sdk_version: "current",
    libs: [
        "android.test.base.stubs",
        "libprotobuf-java-micro",
    ],

    jarjar_rules: ":bluetooth-jarjar-rules",

    kotlincflags: ["-java-parameters"],

    static_libs: [
        "TestParameterInjector",
        "androidx.core_core",
        "androidx.test.espresso.intents",
        "androidx.test.ext.junit",
        "androidx.test.ext.truth",
        "androidx.test.rules",
        "androidx.test.uiautomator_uiautomator",
        "bluetooth-test-util-lib",
        "bluetooth_flags_java_lib",
        "compatibility-device-util-axt",
        "flag-junit",
        "grpc-java-lite",
        "grpc-java-okhttp-client-lite",
        "mockito-kotlin2",
        "opencensus-java-contrib-grpc-metrics",
        "pandora-grpc-java",
        "pandora-proto-java",
        "truth",
    ],

    // Include all test java and kotlin files.
    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
    ],
}

// This empty test host is needed for building required host binary
// "bumble_pandora_server" and include it in test zip
java_test_host {
    name: "BumbleBluetoothTests",

    libs: [
        "tradefed",
    ],

    device_common_data: [
        ":BumbleBluetoothTestsApp",
        ":BumbleBluetoothTestsHelperApp",
        "bumble_config.json",
    ],
    data_native_bins: [
        "bumble_pandora_server",
    ],

    required: ["bumble_pandora_server"],

    test_suites: [
        "general-tests",
        "mts-bt",
    ],
}

// Runs the Bumble Bluetooth tests on a USB Bluetooth dongle.
java_test_host {
    name: "BumbleBluetoothTestsPhy",

    test_config: "AndroidPhyTest.xml",

    libs: [
        "tradefed",
    ],

    data: [
        "bumble_config.json",
    ],
    device_common_data: [
        ":BumbleBluetoothTestsApp",
        ":BumbleBluetoothTestsHelperApp",
    ],
    data_native_bins: [
        "bumble_pandora_server",
    ],

    required: ["bumble_pandora_server"],

    test_suites: [
        "general-tests",
    ],
}

python_binary_host {
    name: "bumble_pandora_server",
    main: "src/bumble_server.py",
    srcs: [
        "src/bumble_server.py",
    ],
    embedded_launcher: false,
    libs: [
        "bumble-pandora",
        "bumble_services_experimental-python",
        "pandora-python",
        "pandora_experimental-python",
    ],
}