blob: 71bb82dd7b5f8f236ffee51d423cd7c28bdec56e [file] [log] [blame]
Luis Hector Chaveze2a7f4b2019-03-18 19:23:29 -07001// Copyright (C) 2019 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
Bob Badour5f579b82021-02-12 21:18:40 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "external_minijail_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["external_minijail_license"],
22}
23
Luis Hector Chaveze2a7f4b2019-03-18 19:23:29 -070024python_binary_host {
25 name: "minijail_compile_seccomp_policy",
26 main: "compile_seccomp_policy.py",
27 srcs: [
28 "arch.py",
29 "bpf.py",
30 "compile_seccomp_policy.py",
31 "compiler.py",
32 "parser.py",
33 ],
34 version: {
35 py2: {
36 enabled: false,
37 },
38 py3: {
39 enabled: true,
40 },
41 },
42}
43
44python_test_host {
45 name: "minijail_parser_unittest",
46 main: "parser_unittest.py",
47 srcs: [
48 "arch.py",
49 "bpf.py",
50 "parser.py",
51 "parser_unittest.py",
52 ],
53 data: [
54 "testdata/arch_64.json",
55 ],
56 version: {
57 py2: {
58 enabled: false,
59 },
60 py3: {
61 enabled: true,
62 },
63 },
64}
65
66python_test_host {
67 name: "minijail_compiler_unittest",
68 main: "compiler_unittest.py",
69 srcs: [
70 "arch.py",
71 "bpf.py",
72 "compiler.py",
73 "compiler_unittest.py",
74 "parser.py",
75 ],
76 data: [
77 "testdata/arch_64.json",
78 ],
79 version: {
80 py2: {
81 enabled: false,
82 },
83 py3: {
84 enabled: true,
85 },
86 },
87}
Luis Hector Chavezc90ec152019-12-13 09:12:33 -080088
89python_binary_host {
90 name: "minijail_generate_constants_json",
91 main: "generate_constants_json.py",
92 srcs: [
93 "generate_constants_json.py",
94 ],
95 version: {
96 py2: {
97 enabled: false,
98 },
99 py3: {
100 enabled: true,
101 },
102 },
103}
104
105
106cc_genrule {
107 name: "minijail_constants_json",
108 host_supported: true,
109 vendor_available: true,
110 recovery_available: true,
111 tools: ["minijail_generate_constants_json"],
112 cmd: "$(location minijail_generate_constants_json) --output=$(out) $(in)",
113 srcs: [
114 ":libminijail_gen_constants_llvmir",
115 ":libminijail_gen_syscall_llvmir",
116 ],
117 out: ["constants.json"],
118}