1// 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 15package { 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 24python_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} 35 36python_test_host { 37 name: "minijail_parser_unittest", 38 main: "parser_unittest.py", 39 srcs: [ 40 "arch.py", 41 "bpf.py", 42 "parser.py", 43 "parser_unittest.py", 44 ], 45 data: [ 46 "testdata/arch_64.json", 47 ], 48 version: { 49 py3: { 50 embedded_launcher: true, 51 }, 52 }, 53} 54 55python_test_host { 56 name: "minijail_compiler_unittest", 57 main: "compiler_unittest.py", 58 srcs: [ 59 "arch.py", 60 "bpf.py", 61 "compiler.py", 62 "compiler_unittest.py", 63 "parser.py", 64 ], 65 data: [ 66 "testdata/arch_64.json", 67 ], 68 version: { 69 py3: { 70 embedded_launcher: true, 71 }, 72 }, 73} 74 75python_binary_host { 76 name: "minijail_generate_constants_json", 77 main: "generate_constants_json.py", 78 srcs: [ 79 "generate_constants_json.py", 80 ], 81} 82 83 84cc_genrule { 85 name: "minijail_constants_json", 86 host_supported: true, 87 vendor_available: true, 88 recovery_available: true, 89 tools: ["minijail_generate_constants_json"], 90 cmd: "$(location minijail_generate_constants_json) --output=$(out) $(in)", 91 srcs: [ 92 ":libminijail_gen_constants_llvmir", 93 ":libminijail_gen_syscall_llvmir", 94 ], 95 out: ["constants.json"], 96} 97