1// Copyright (C) 2014 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 default_team: "trendy_team_platform_security", 17 // See: http://go/android-license-faq 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21java_test_host { 22 // Must match the package name in CtsTestCaseList.mk 23 name: "CtsSecurityHostTestCases", 24 defaults: ["cts_defaults"], 25 srcs: [ 26 "src/**/*.java", 27 ], 28 // tag this module as a cts test artifact 29 test_suites: [ 30 "cts", 31 "general-tests", 32 ], 33 libs: [ 34 "cts-tradefed", 35 "tradefed", 36 "compatibility-host-util", 37 ], 38 device_common_java_resources: [ 39 ":plat_seapp_contexts", 40 ":plat_seapp_neverallows", 41 ":plat_file_contexts", 42 ":plat_property_contexts", 43 ":plat_service_contexts", 44 ], 45 static_libs: [ 46 "CtsSecurityHostTestCases_StaticLibs", 47 "diffutils-prebuilt-jar", 48 "CompatChangeGatingTestBase", 49 "cts-host-utils", 50 ], 51 device_common_data: [ 52 ":CtsZipValidateApp", 53 ":CtsDynamicCodeLoadingApp", 54 ], 55 // These two host cc_library_* modules cannot be wrapped as java_resources directly into 56 // a .jar due to the "missing variant" issue, see b/197025344 for more details. This workaround 57 // will install these two modules alongside with the .jar file in the testcases directory. 58 jni_libs: [ 59 "libsepolwrap", 60 "libc++", 61 ], 62 target_required: ["CtsDeviceInfo"], 63} 64 65java_genrule_host { 66 name: "CtsSecurityHostTestCases_StaticLibs", 67 tools: [ 68 "soong_zip", 69 "checkseapp", 70 "checkfc", 71 "property_info_checker", 72 "searchpolicy", 73 "secilc", 74 "sepolicy-analyze", 75 "sepolicy_tests", 76 ], 77 tool_files: [ 78 ":prebuilt_sepolicy_cts_data", 79 ], 80 device_common_srcs: [ 81 ":general_sepolicy.conf", 82 ], 83 out: ["CtsSecurityHostTestCases_StaticLibs.jar"], 84 cmd: "echo $(locations :prebuilt_sepolicy_cts_data) > $(out).prebuilt_list.txt && " + 85 "$(location soong_zip) -jar -o $(location CtsSecurityHostTestCases_StaticLibs.jar) -j " + 86 "-f $(location checkseapp) " + 87 "-f $(location checkfc) " + 88 "-f $(location property_info_checker) " + 89 "-f $(location searchpolicy) " + 90 "-f $(location secilc) " + 91 "-f $(location sepolicy-analyze) " + 92 "-f $(location sepolicy_tests) " + 93 "-f $(location :general_sepolicy.conf) " + 94 "-l $(out).prebuilt_list.txt", 95} 96