1// Copyright (C) 2024 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17    default_team: "trendy_team_fwk_uwb",
18}
19
20python_defaults {
21    name: "betocq_lib_defaults",
22    pkg_path: "betocq",
23}
24
25python_defaults {
26    name: "betocq_test_defaults",
27    version: {
28        py3: {
29            embedded_launcher: false,
30        },
31    },
32}
33
34// Libraries
35
36python_library_host {
37    name: "betocq_lib",
38    defaults: ["betocq_lib_defaults"],
39    srcs: [
40        "android_wifi_utils.py",
41        "gms_auto_updates_util.py",
42        "nc_constants.py",
43        "nearby_connection_wrapper.py",
44        "setup_utils.py",
45        "iperf_utils.py",
46        "version.py",
47    ],
48    libs: [
49        "mobly",
50    ],
51}
52
53python_library_host {
54    name: "base_betocq_suite",
55    defaults: ["betocq_lib_defaults"],
56    srcs: [
57        "base_betocq_suite.py",
58    ],
59    libs: [
60        "mobly",
61        "pyyaml",
62    ],
63}
64
65python_library_host {
66    name: "d2d_performance_test_base",
67    defaults: ["betocq_lib_defaults"],
68    srcs: [
69        "d2d_performance_test_base.py",
70    ],
71    libs: [
72        "betocq_lib",
73        "mobly",
74        "betocq_nc_base_test",
75    ],
76}
77
78python_library_host {
79    name: "betocq_nc_base_test",
80    defaults: ["betocq_lib_defaults"],
81    srcs: [
82        "nc_base_test.py",
83    ],
84    libs: [
85        "betocq_lib",
86        "mobly",
87        "pyyaml",
88    ],
89}
90
91python_library_host {
92    name: "betocq_compound_tests",
93    defaults: ["betocq_lib_defaults"],
94    srcs: ["compound_tests/*.py"],
95    libs: [
96        "betocq_lib",
97        "d2d_performance_test_base",
98        "mobly",
99    ],
100}
101
102python_library_host {
103    name: "betocq_directed_tests",
104    defaults: ["betocq_lib_defaults"],
105    srcs: ["directed_tests/*.py"],
106    libs: [
107        "betocq_lib",
108        "d2d_performance_test_base",
109        "mobly",
110    ],
111}
112
113python_library_host {
114    name: "betocq_function_tests",
115    defaults: ["betocq_lib_defaults"],
116    srcs: ["function_tests/*.py"],
117    libs: [
118        "betocq_lib",
119        "mobly",
120    ],
121}
122
123// TODO: Add modules for individual test classes.
124
125// Test suites
126
127python_test_host {
128    name: "betocq_test_suite",
129    defaults: ["betocq_test_defaults"],
130    main: "betocq_test_suite.py",
131    srcs: ["betocq_test_suite.py"],
132    libs: [
133        "base_betocq_suite",
134        "betocq_compound_tests",
135        "betocq_directed_tests",
136        "betocq_function_tests",
137        "betocq_lib",
138        "mobly",
139    ],
140    data: [
141        "cuj_and_test_config.yml",
142        // package the snippets for atest
143        ":nearby_snippet",
144        ":nearby_snippet_2",
145        ":nearby_snippet_3p",
146    ],
147    test_suites: [],
148    test_options: {
149        unit_test: false, // as Mobly tests require device(s)
150        // This tag is used to enable the ATest Mobly runner
151        tags: ["mobly"],
152    },
153}
154