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 "tools_treble_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["tools_treble_license"], 22} 23 24python_defaults { 25 name: "treble_build_default", 26 pkg_path: "treble/build", 27 version: { 28 py2: { 29 enabled: false, 30 }, 31 py3: { 32 enabled: true, 33 }, 34 }, 35} 36 37python_library_host { 38 name: "treble_build_lib", 39 defaults: ["treble_build_default"], 40 srcs: [ 41 "sandbox/build_android_sandboxed.py", 42 "sandbox/config.py", 43 "sandbox/nsjail.py", 44 "sandbox/overlay.py", 45 "sandbox/rbe.py", 46 ], 47} 48 49python_test_host { 50 name: "treble_build_test", 51 main: "test.py", 52 defaults: ["treble_build_default"], 53 srcs: [ 54 "sandbox/build_android_sandboxed_test.py", 55 "sandbox/config_test.py", 56 "sandbox/nsjail_test.py", 57 "sandbox/overlay_test.py", 58 "sandbox/rbe_test.py", 59 "test.py", 60 "sample_test.py", 61 ], 62 libs: [ 63 "treble_build_lib", 64 ], 65 test_config: "test.xml", 66 test_options: { 67 unit_test: true, 68 }, 69} 70