blob: e816d6b108b4ad0390afc912879d6221e2ab2c62 [file] [log] [blame]
// Copyright (C) 2014 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_team: "trendy_team_platform_security",
// See: http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
java_test_host {
// Must match the package name in CtsTestCaseList.mk
name: "CtsSecurityHostTestCases",
defaults: ["cts_defaults"],
srcs: [
"src/**/*.java",
],
// tag this module as a cts test artifact
test_suites: [
"cts",
"general-tests",
],
libs: [
"cts-tradefed",
"tradefed",
"compatibility-host-util",
],
java_resources: [
":plat_seapp_contexts",
":plat_seapp_neverallows",
":plat_file_contexts",
":plat_property_contexts",
":plat_service_contexts",
],
static_libs: [
"CtsSecurityHostTestCases_StaticLibs",
"diffutils-prebuilt-jar",
"CompatChangeGatingTestBase",
"cts-host-utils",
],
data: [
":CtsZipValidateApp",
],
// These two host cc_library_* modules cannot be wrapped as java_resources directly into
// a .jar due to the "missing variant" issue, see b/197025344 for more details. This workaround
// will install these two modules alongside with the .jar file in the testcases directory.
jni_libs: [
"libsepolwrap",
"libc++",
],
target_required: ["CtsDeviceInfo"],
}
java_genrule_host {
name: "CtsSecurityHostTestCases_StaticLibs",
tools: [
"soong_zip",
"checkseapp",
"checkfc",
"property_info_checker",
"searchpolicy",
"secilc",
"sepolicy-analyze",
"sepolicy_tests",
],
tool_files: [
":general_sepolicy.conf",
":prebuilt_sepolicy_cts_data",
],
out: ["CtsSecurityHostTestCases_StaticLibs.jar"],
cmd: "echo $(locations :prebuilt_sepolicy_cts_data) > $(out).prebuilt_list.txt && " +
"$(location soong_zip) -jar -o $(location CtsSecurityHostTestCases_StaticLibs.jar) -j " +
"-f $(location checkseapp) " +
"-f $(location checkfc) " +
"-f $(location property_info_checker) " +
"-f $(location searchpolicy) " +
"-f $(location secilc) " +
"-f $(location sepolicy-analyze) " +
"-f $(location sepolicy_tests) " +
"-f $(location :general_sepolicy.conf) " +
"-l $(out).prebuilt_list.txt",
}