| // Copyright (C) 2022 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_applicable_licenses: ["Android-Apache-2.0"], |
| } |
| |
| android_test_helper_app { |
| name: "BUG-237291548", |
| defaults: ["cts_support_defaults"], |
| srcs: ["src/**/*.java"], |
| test_suites: [ |
| "cts", |
| "vts10", |
| "sts", |
| ], |
| static_libs: [ |
| "androidx.appcompat_appcompat", |
| "androidx.test.rules", |
| "androidx.test.uiautomator_uiautomator", |
| "androidx.test.core", |
| ], |
| sdk_version: "current", |
| } |
| |
| android_test_helper_app { |
| name: "BUG-237291548-FAIL-INSTALL", |
| defaults: ["cts_support_defaults"], |
| srcs: ["src/**/*.java"], |
| manifest: ":BUG-237291548-BAD-MANIFEST", |
| test_suites: [ |
| "cts", |
| "vts10", |
| "sts", |
| ], |
| static_libs: [ |
| "androidx.appcompat_appcompat", |
| "androidx.test.rules", |
| "androidx.test.uiautomator_uiautomator", |
| "androidx.test.core", |
| ], |
| sdk_version: "current", |
| } |
| |
| // Modify the manifest file to include more than 500 MIME groups. The resulting |
| // test apk generated using this manifest should fail package install since the |
| // number of MIME groups is limited to a maximum of 500 per package. |
| genrule { |
| name: "BUG-237291548-BAD-MANIFEST", |
| srcs: ["AndroidManifest.xml"], |
| out: ["BadAndroidManifest.xml"], |
| cmd: "awk '/myMimeGroup/{print;for(i=0;i<501;i++){sub(/myMimeGroup[0-9]*/,\"myMimeGroup\"i);print}}1' $(in) > $(out)", |
| } |