1// Copyright (C) 2018 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
15python_defaults {
16    name: "aidegen_default",
17    pkg_path: "aidegen",
18    version: {
19        py2: {
20            enabled: false,
21            embedded_launcher: false,
22        },
23        py3: {
24            enabled: true,
25            embedded_launcher: false,
26        },
27    },
28}
29
30python_binary_host {
31    name: "aidegen",
32    // Make aidegen's built name to aidegen-dev
33    suffix: "-dev",
34    defaults: ["aidegen_default"],
35    main: "aidegen_main.py",
36    srcs: [
37        "**/*.py",
38    ],
39    libs: [
40        "atest_module_info",
41        "asuite_cc_client",
42    ],
43    data: [
44        ":asuite_version",
45    ],
46    dist: {
47        targets: ["droidcore"],
48    },
49}
50
51python_library_host {
52    name: "aidegen_lib",
53    defaults: ["aidegen_default"],
54    srcs: [
55        "**/*.py",
56    ],
57    exclude_srcs: [
58        "*_unittest.py",
59        "*/*_unittest.py",
60    ]
61}
62
63python_library_host {
64    name: "aidegen_lib_common_util",
65    defaults: ["aidegen_default"],
66    srcs: [
67        "lib/common_util.py",
68        "lib/errors.py",
69        "constant.py",
70    ],
71    exclude_srcs: [
72        "*_unittest.py",
73        "*/*_unittest.py",
74    ]
75}
76
77python_test_host {
78    name: "aidegen_unittests",
79    main: "aidegen_run_unittests.py",
80    pkg_path: "aidegen",
81    srcs: [
82        "**/*.py",
83    ],
84    data: [
85        "test_data/**/*",
86    ],
87    libs: [
88        "py-mock",
89        "atest_module_info",
90        "asuite_cc_client",
91    ],
92    test_config: "aidegen_unittests.xml",
93    test_suites: ["general-tests"],
94    defaults: ["aidegen_default"],
95}
96