1package { 2 // http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // the below license kinds from "system_sepolicy_license": 5 // SPDX-license-identifier-Apache-2.0 6 default_applicable_licenses: ["system_sepolicy_license"], 7} 8 9cc_library_host_shared { 10 name: "libsepolwrap", 11 srcs: ["sepol_wrap.cpp"], 12 cflags: [ 13 "-Wall", 14 "-Werror", 15 ], 16 export_include_dirs: ["include"], 17 stl: "c++_static", 18 19 // libsepolwrap gets loaded from the system python, which does not have the 20 // ASAN runtime. So turn off sanitization for ourself, and use static 21 // libraries, since the shared libraries will use ASAN. 22 static_libs: [ 23 "libbase", 24 "libsepol", 25 ], 26 sanitize: { 27 never: true, 28 }, 29} 30 31python_library_host { 32 name: "mini_cil_parser", 33 srcs: ["mini_parser.py"], 34} 35 36python_library_host { 37 name: "pysepolwrap", 38 srcs: [ 39 "fc_sort.py", 40 "policy.py", 41 ], 42} 43 44python_binary_host { 45 name: "treble_sepolicy_tests", 46 srcs: [ 47 "treble_sepolicy_tests.py", 48 ], 49 libs: [ 50 "mini_cil_parser", 51 ], 52} 53 54python_binary_host { 55 name: "sepolicy_tests", 56 srcs: [ 57 "sepolicy_tests.py", 58 ], 59 libs: ["pysepolwrap"], 60 data: [":libsepolwrap"], 61} 62 63python_binary_host { 64 name: "apex_sepolicy_tests", 65 srcs: [ 66 "apex_sepolicy_tests.py", 67 ], 68 libs: ["pysepolwrap"], 69 data: [ 70 ":libsepolwrap", 71 ], 72 device_common_data: [ 73 ":precompiled_sepolicy", 74 ], 75} 76 77python_test_host { 78 name: "apex_sepolicy_tests_test", 79 srcs: [ 80 "apex_sepolicy_tests.py", 81 "apex_sepolicy_tests_test.py", 82 ], 83 libs: ["pysepolwrap"], 84 data: [ 85 ":libsepolwrap", 86 ], 87 device_common_data: [ 88 ":precompiled_sepolicy", 89 ], 90 test_options: { 91 unit_test: true, 92 }, 93} 94 95python_binary_host { 96 name: "searchpolicy", 97 srcs: [ 98 "searchpolicy.py", 99 ], 100 libs: ["pysepolwrap"], 101 required: ["libsepolwrap"], 102} 103 104python_binary_host { 105 name: "combine_maps", 106 srcs: [ 107 "combine_maps.py", 108 ], 109 libs: ["mini_cil_parser"], 110} 111 112python_binary_host { 113 name: "fc_sort", 114 srcs: [ 115 "fc_sort.py", 116 ], 117} 118 119python_test_host { 120 name: "fc_sort_test", 121 srcs: [ 122 "fc_sort.py", 123 "fc_sort_test.py", 124 ], 125 test_options: { 126 unit_test: true, 127 }, 128} 129 130python_binary_host { 131 name: "check_prop_prefix", 132 srcs: ["check_prop_prefix.py"], 133} 134 135python_binary_host { 136 name: "sepolicy_freeze_test", 137 srcs: [ 138 "sepolicy_freeze_test.py", 139 ], 140 libs: [ 141 "mini_cil_parser", 142 ], 143} 144 145python_test_host { 146 name: "policy_test", 147 srcs: [ 148 "fc_sort.py", 149 "policy.py", 150 "policy_test.py", 151 ], 152 test_options: { 153 unit_test: true, 154 }, 155} 156 157// prebuilt files to be included to CTS 158filegroup { 159 name: "prebuilt_sepolicy_cts_data", 160 srcs: [ 161 ":202404_sepolicy_cts_data", 162 ":202504_sepolicy_cts_data", 163 ], 164 visibility: ["//cts/hostsidetests/security"], 165} 166