1// Copyright (C) 2020 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_framework_android_packages", 17 // See: http://go/android-license-faq 18 // A large-scale-change added 'default_applicable_licenses' to import 19 // all of the 'license_kinds' from "frameworks_base_license" 20 // to get the below license kinds: 21 // SPDX-license-identifier-Apache-2.0 22 default_applicable_licenses: ["frameworks_base_license"], 23} 24 25java_test_host { 26 name: "PackageManagerServiceHostTests", 27 srcs: [ 28 "src/**/*.java", 29 "src/**/*.kt", 30 ], 31 libs: [ 32 "tradefed", 33 "junit", 34 "truth", 35 ], 36 static_libs: [ 37 "ApexInstallHelper", 38 "android.security.flags-aconfig-java-host", 39 "cts-host-utils", 40 "flag-junit-host", 41 "frameworks-base-hostutils", 42 "kotlin-test", 43 "PackageManagerServiceHostTestsIntentVerifyUtils", 44 "block_device_writer_jar", 45 ], 46 test_suites: ["device-tests"], 47 data: [ 48 ":PackageManagerTestApex", 49 ":PackageManagerTestApexApp", 50 ":PackageManagerServiceServerTests", 51 ], 52 data_device_bins_both: [ 53 "block_device_writer", 54 "fsverity_multilib", 55 ], 56 java_resources: [ 57 ":PackageManagerTestOverlayActor", 58 ":PackageManagerTestOverlay", 59 ":PackageManagerTestOverlayTarget", 60 ":PackageManagerTestOverlayTargetNoOverlayable", 61 ":PackageManagerTestAppDeclaresStaticLibrary", 62 ":PackageManagerTestAppDifferentPkgName", 63 ":PackageManagerTestAppStub", 64 ":PackageManagerTestAppUsesStaticLibrary", 65 ":PackageManagerTestAppVersion1", 66 ":PackageManagerTestAppVersion2", 67 ":PackageManagerTestAppVersion2AltKey", 68 ":PackageManagerTestAppVersion3", 69 ":PackageManagerTestAppVersion3Invalid", 70 ":PackageManagerTestAppVersion4", 71 ":PackageManagerTestAppOriginalOverride", 72 ":PackageManagerServiceDeviceSideTests", 73 ], 74} 75 76genrule { 77 name: "PackageManagerTestAppVersion3Invalid", 78 tools: [ 79 "soong_zip", 80 "zipalign", 81 ], 82 srcs: [ 83 ":PackageManagerTestAppVersion3", 84 ], 85 out: ["PackageManagerTestAppVersion3Invalid.apk"], 86 cmd: "mkdir -p $(genDir)/apk && unzip $(in) -d $(genDir)/apk" + 87 " && truncate -s 800 $(genDir)/apk/META-INF/CERT.RSA" + 88 " && $(location soong_zip) -o $(genDir)/temp.apk -L 0 -C $(genDir)/apk -D $(genDir)/apk" + 89 " && $(location zipalign) -f 4 $(genDir)/temp.apk $(out)", 90} 91