1// Copyright 2018 Google Inc. All rights reserved.
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_test {
16  name: "py2-funcsigs-tests",
17  // use _ instead of . in the name to avoid error:
18  //   error: external/python/funcsigs/Android.bp:18:7: module "py2-funcsigs-tests" variant
19  //   "linux_glibc_x86_64_PY2": srcs: the path "Android.tests.py" contains invalid token "Android.tests".
20  main: "Android_tests.py",
21  srcs: [
22      // important: the tests must be run as if they were in the 'tests' module
23      // (i.e. from external/python/funcsigs) otherwise one of the tests will fail.
24      "tests/*.py",
25      "Android_tests.py",
26  ],
27  host_supported: true,
28  libs: ["py-funcsigs"],
29  version: {
30    py2: {
31      enabled: true,
32    },
33    py3: {
34      enabled: false,
35    },
36  },
37  // required for tests.test_funcsigs.TestFunctionSignatures
38  data: ["README.rst"],
39}
40
41python_test {
42  name: "py3-funcsigs-tests",
43  main: "Android_tests.py",
44  srcs: [
45      "tests/*.py",
46      "Android_tests.py",
47  ],
48  host_supported: true,
49  libs: ["py-funcsigs"],
50  version: {
51    py2: {
52      enabled: false,
53    },
54    py3: {
55      enabled: true,
56    },
57  },
58  data: ["README.rst"],
59}
60