blob: d383dfb5ffa6465b190a242f2b5feea89272e4f2 [file]
// 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",
],
device_common_java_resources: [
":plat_seapp_contexts",
":plat_seapp_neverallows",
":plat_file_contexts_cts",
":plat_property_contexts",
":plat_service_contexts",
],
static_libs: [
"CtsSecurityHostTestCases_StaticLibs",
"diffutils-prebuilt-jar",
"CompatChangeGatingTestBase",
"cts-host-utils",
],
device_common_data: [
":CtsZipValidateApp",
":CtsDeviceInfo",
],
// 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: [
":prebuilt_sepolicy_cts_data",
],
device_common_srcs: [
":general_sepolicy.conf",
],
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",
}
test_module_config_host {
name: "CtsSecurityHostTestCases_SELinuxHostTest-priv-apps-running",
base: "CtsSecurityHostTestCases",
test_suites: ["general-tests"],
include_filters: [
"android.security.cts.SELinuxHostTest#testPermissionControllerDomain",
"android.security.cts.SELinuxHostTest#testNoBugreportDenials",
"android.security.cts.SELinuxHostTest#testGMSCoreDomain",
"android.security.cts.SELinuxHostTest#testVzwOmaTriggerDomain",
],
}