summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hai Zhang <zhanghai@google.com> 2019-11-08 15:23:40 -0800
committer Hai Zhang <zhanghai@google.com> 2019-12-02 14:27:37 -0800
commitcf2fed6c228a7392bacd2d7f825f2f92aae4f100 (patch)
tree0f42864b9341a8942e43cc26546059e66cfda143
parentaccf443c08a0dc56ae05dad1ec8dcb50474e4808 (diff)
Add install test for permission APEX.
Bug: 136503238 Test: atest --rebuild-module-info permission_e2e_tests Change-Id: I05cc0f19679bc0d03785233a38bb1a8b31cd3652
-rw-r--r--apex/permission/Android.bp5
-rw-r--r--apex/permission/testing/Android.bp25
-rw-r--r--apex/permission/testing/test_manifest.json4
3 files changed, 33 insertions, 1 deletions
diff --git a/apex/permission/Android.bp b/apex/permission/Android.bp
index 027481401557..5945fb381963 100644
--- a/apex/permission/Android.bp
+++ b/apex/permission/Android.bp
@@ -14,9 +14,12 @@
apex {
name: "com.android.permission",
-
+ defaults: ["com.android.permission-defaults"],
manifest: "apex_manifest.json",
+}
+apex_defaults {
+ name: "com.android.permission-defaults",
key: "com.android.permission.key",
certificate: ":com.android.permission.certificate",
}
diff --git a/apex/permission/testing/Android.bp b/apex/permission/testing/Android.bp
new file mode 100644
index 000000000000..f8978dcd83ee
--- /dev/null
+++ b/apex/permission/testing/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2019 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.
+
+apex {
+ name: "test_com.android.permission",
+ visibility: [
+ "//system/apex/tests",
+ ],
+ defaults: ["com.android.permission-defaults"],
+ manifest: "test_manifest.json",
+ file_contexts: ":com.android.permission-file_contexts",
+ // Test APEX, should never be installed
+ installable: false,
+}
diff --git a/apex/permission/testing/test_manifest.json b/apex/permission/testing/test_manifest.json
new file mode 100644
index 000000000000..bc19a9ea0172
--- /dev/null
+++ b/apex/permission/testing/test_manifest.json
@@ -0,0 +1,4 @@
+{
+ "name": "com.android.permission",
+ "version": 2147483647
+}