aboutsummaryrefslogtreecommitdiff
path: root/test/hidl_test/Android.bp
blob: e90ff4e590e731af68417ac67606d0c8c3fd2cdb (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
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "system_tools_hidl_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["system_tools_hidl_license"],
}

python_test_host {
    name: "hidl_test",
    main: "hidl_test.py",
    srcs: ["hidl_test.py"],
    test_config: "hidl_test.xml",
    target_required: [
        "hidl_test_client",
        "hidl_test_servers",
    ],
    test_suites: ["general-tests"],
    test_options: {
        unit_test: false,
    },
}

cc_defaults {
    name: "hidl_test-defaults",
    defaults: ["hidl-gen-defaults"],

    shared_libs: [
        "android.hidl.memory@1.0",
        "android.hidl.memory.token@1.0",
        "android.hidl.token@1.0",
        "libbase",
        "libcutils",
        "libhidlbase",
        "libhidlmemory",
        "liblog",
        "libutils",
    ],

    // Allow dlsym'ing self for statically linked passthrough implementations
    ldflags: ["-rdynamic"],

    // These are static libs only for testing purposes and portability. Shared
    // libs should be used on device.
    static_libs: [
        "libfootest",
        "libhidl-gen-utils",
        "android.hardware.tests.expression@1.0",
        "android.hardware.tests.foo@1.0",
        "android.hardware.tests.bar@1.0",
        "android.hardware.tests.baz@1.0",
        "android.hardware.tests.hash@1.0",
        "android.hardware.tests.inheritance@1.0",
        "android.hardware.tests.memory@1.0",
        "android.hardware.tests.multithread@1.0",
        "android.hardware.tests.trie@1.0",
        "android.hardware.tests.safeunion.cpp@1.0",
        "android.hardware.tests.safeunion@1.0",
    ],

    // impls should never be static, these are used only for testing purposes
    // and test portability since this test pairs with specific hal
    // implementations
    whole_static_libs: [
        "android.hardware.tests.foo@1.0-impl",
        "android.hardware.tests.bar@1.0-impl",
        "android.hardware.tests.baz@1.0-impl",
        "android.hardware.tests.hash@1.0-impl",
        "android.hardware.tests.inheritance@1.0-impl",
        "android.hardware.tests.memory@1.0-impl",
        "android.hardware.tests.multithread@1.0-impl",
        "android.hardware.tests.trie@1.0-impl",
        "android.hardware.tests.safeunion.cpp@1.0-impl",
        "android.hardware.tests.safeunion@1.0-impl",
    ],

    group_static_libs: true,

    compile_multilib: "both",
    multilib: {
        lib32: {
            suffix: "32",
        },
        lib64: {
            suffix: "64",
        },
    },
    test_suites: ["general-tests"],
}

cc_test {
    name: "hidl_test_client",
    defaults: ["hidl_test-defaults"],

    tidy_timeout_srcs: [
        "hidl_test_client.cpp",
    ],
    srcs: [
        "hidl_test_client.cpp",
        "FooCallback.cpp",
        "static_test.cpp",
    ],

    shared_libs: [
        "android.hidl.allocator@1.0",
    ],
}

cc_test {
    name: "hidl_test_servers",
    defaults: ["hidl_test-defaults"],
    srcs: ["hidl_test_servers.cpp"],
    gtest: false,
}