xref: /aosp_15_r20/system/extras/torq/Android.bp (revision 288bf5226967eb3dac5cce6c939ccc2a7f2b4fe5)
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_team: "trendy_team_aaos_framework",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20python_defaults {
21    name: "torq_defaults",
22    srcs: [
23        "torq.py",
24        "command.py",
25        "command_executor.py",
26        "validation_error.py",
27        "device.py",
28        "config_builder.py",
29        "open_ui.py",
30        "utils.py",
31        "validate_simpleperf.py",
32    ],
33}
34
35python_binary_host {
36    name: "torq",
37    main: "torq.py",
38    defaults: ["torq_defaults"],
39}
40
41python_test_host {
42    name: "torq_unit_test",
43    main: "tests/torq_unit_test.py",
44    srcs: ["tests/torq_unit_test.py"],
45    defaults: ["torq_defaults"],
46    version: {
47        py3: {
48            enabled: true,
49            embedded_launcher: false,
50        },
51    },
52    test_options: {
53        unit_test: true,
54    },
55}
56
57python_test_host {
58    name: "device_unit_test",
59    main: "tests/device_unit_test.py",
60    srcs: ["tests/device_unit_test.py"],
61    defaults: ["torq_defaults"],
62    version: {
63        py3: {
64            enabled: true,
65            embedded_launcher: false,
66        },
67    },
68    test_options: {
69        unit_test: true,
70    },
71}
72
73python_test_host {
74    name: "config_builder_unit_test",
75    main: "tests/config_builder_unit_test.py",
76    srcs: ["tests/config_builder_unit_test.py"],
77    defaults: ["torq_defaults"],
78    version: {
79        py3: {
80            enabled: true,
81            embedded_launcher: false,
82        },
83    },
84    test_options: {
85        unit_test: true,
86    },
87}
88
89python_test_host {
90    name: "command_executor_unit_test",
91    main: "tests/command_executor_unit_test.py",
92    srcs: ["tests/command_executor_unit_test.py"],
93    defaults: ["torq_defaults"],
94    version: {
95        py3: {
96            enabled: true,
97            embedded_launcher: false,
98        },
99    },
100    test_options: {
101        unit_test: true,
102    },
103}
104
105python_test_host {
106    name: "validate_simpleperf_unit_test",
107    main: "tests/validate_simpleperf_unit_test.py",
108    srcs: ["tests/validate_simpleperf_unit_test.py"],
109    defaults: ["torq_defaults"],
110    version: {
111        py3: {
112            enabled: true,
113            embedded_launcher: false,
114        },
115    },
116    test_options: {
117        unit_test: true,
118    },
119}
120