blob: 766ff4a727bdccd4eca65e4eadbe14f7af9312d5 [file] [log] [blame]
Richard Uhlera7291342019-03-07 14:51:05 +00001// Copyright (C) 2019 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
Bob Badoure539dba2021-02-12 17:07:05 -080015package {
16 // See: http://go/android-license-faq
17 // A large-scale-change added 'default_applicable_licenses' to import
18 // all of the 'license_kinds' from "frameworks_base_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 default_applicable_licenses: ["frameworks_base_license"],
22}
23
Richard Uhlera7291342019-03-07 14:51:05 +000024android_test {
25 name: "RollbackTest",
26 manifest: "RollbackTest/AndroidManifest.xml",
Colin Cross082aec62020-08-27 04:12:26 +000027 platform_apis: true,
Richard Uhlera7291342019-03-07 14:51:05 +000028 srcs: ["RollbackTest/src/**/*.java"],
Cole Faust5aeb9fd2024-10-22 16:30:57 -070029 static_libs: [
30 "androidx.test.rules",
31 "cts-rollback-lib",
32 "cts-install-lib",
33 ],
Richard Uhlera7291342019-03-07 14:51:05 +000034 test_suites: ["general-tests"],
Richard Uhlera7291342019-03-07 14:51:05 +000035 test_config: "RollbackTest.xml",
Mohammad Samiul Islame7e63a62020-01-16 13:55:49 +000036 java_resources: [
37 ":com.android.apex.apkrollback.test_v2",
JW Wang858845f2021-07-14 11:17:04 +080038 ":com.android.apex.apkrollback.test_v2Crashing",
39 ":test.rebootless_apex_v2",
Mohammad Samiul Islame7e63a62020-01-16 13:55:49 +000040 ],
Richard Uhlera7291342019-03-07 14:51:05 +000041}
42
43java_test_host {
44 name: "StagedRollbackTest",
45 srcs: ["StagedRollbackTest/src/**/*.java"],
46 libs: ["tradefed"],
JW Wang3ac333f22020-07-08 17:06:36 +080047 static_libs: [
48 "compatibility-tradefed",
49 "frameworks-base-hostutils",
50 "RollbackTestLib",
51 "testng",
52 ],
Richard Uhlera7291342019-03-07 14:51:05 +000053 test_suites: ["general-tests"],
54 test_config: "StagedRollbackTest.xml",
Cole Faust5aeb9fd2024-10-22 16:30:57 -070055 device_common_data: [
JW Wang858845f2021-07-14 11:17:04 +080056 ":com.android.apex.apkrollback.test_v1",
57 ":test.rebootless_apex_v1",
Yikeeee7bd32022-09-28 20:58:25 +080058 ":RollbackTest",
JW Wang858845f2021-07-14 11:17:04 +080059 ],
Richard Uhlera7291342019-03-07 14:51:05 +000060}
shafik2340e8b2019-05-30 15:15:43 +010061
62java_test_host {
JW Wangce92d632020-01-16 16:22:00 +080063 name: "NetworkStagedRollbackTest",
64 srcs: ["NetworkStagedRollbackTest/src/**/*.java"],
65 libs: ["tradefed"],
Cole Faust5aeb9fd2024-10-22 16:30:57 -070066 static_libs: [
67 "RollbackTestLib",
68 "frameworks-base-hostutils",
69 ],
JW Wangce92d632020-01-16 16:22:00 +080070 test_suites: ["general-tests"],
71 test_config: "NetworkStagedRollbackTest.xml",
Cole Faust5aeb9fd2024-10-22 16:30:57 -070072 device_common_data: [":RollbackTest"],
JW Wangce92d632020-01-16 16:22:00 +080073}
74
75java_test_host {
Gavin Corkerya859e8a2019-09-06 12:14:26 +010076 name: "MultiUserRollbackTest",
77 srcs: ["MultiUserRollbackTest/src/**/*.java"],
shafik2340e8b2019-05-30 15:15:43 +010078 libs: ["tradefed"],
JW Wang838dea52020-07-15 13:56:13 +080079 static_libs: [
80 "frameworks-base-hostutils",
81 ],
shafik2340e8b2019-05-30 15:15:43 +010082 test_suites: ["general-tests"],
Gavin Corkerya859e8a2019-09-06 12:14:26 +010083 test_config: "MultiUserRollbackTest.xml",
Cole Faust5aeb9fd2024-10-22 16:30:57 -070084 device_common_data: [":RollbackTest"],
shafik2340e8b2019-05-30 15:15:43 +010085}
Mohammad Samiul Islam3fcecfc2019-12-20 17:46:01 +000086
JW Wangd617d2f2020-02-12 17:18:00 +080087java_library_host {
88 name: "RollbackTestLib",
89 srcs: ["lib/src/**/*.java"],
90 libs: ["tradefed"],
91}
92
Mohammad Samiul Islam3fcecfc2019-12-20 17:46:01 +000093genrule {
Cole Faust5aeb9fd2024-10-22 16:30:57 -070094 name: "com.android.apex.apkrollback.test.pem",
95 out: ["com.android.apex.apkrollback.test.pem"],
96 cmd: "openssl genrsa -out $(out) 4096",
Mohammad Samiul Islam3fcecfc2019-12-20 17:46:01 +000097}
98
99genrule {
Cole Faust5aeb9fd2024-10-22 16:30:57 -0700100 name: "com.android.apex.apkrollback.test.pubkey",
101 srcs: [":com.android.apex.apkrollback.test.pem"],
102 out: ["com.android.apex.apkrollback.test.pubkey"],
103 tools: ["avbtool"],
104 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)",
Mohammad Samiul Islam3fcecfc2019-12-20 17:46:01 +0000105}
106
107apex_key {
Cole Faust5aeb9fd2024-10-22 16:30:57 -0700108 name: "com.android.apex.apkrollback.test.key",
109 private_key: ":com.android.apex.apkrollback.test.pem",
110 public_key: ":com.android.apex.apkrollback.test.pubkey",
111 installable: false,
Mohammad Samiul Islam3fcecfc2019-12-20 17:46:01 +0000112}
113
114apex {
Cole Faust5aeb9fd2024-10-22 16:30:57 -0700115 name: "com.android.apex.apkrollback.test_v1",
116 manifest: "testdata/manifest_v1.json",
117 androidManifest: "testdata/AndroidManifest.xml",
118 file_contexts: ":apex.test-file_contexts",
119 key: "com.android.apex.apkrollback.test.key",
120 apps: ["TestAppAv1"],
121 installable: false,
122 updatable: false,
Mohammad Samiul Islam3fcecfc2019-12-20 17:46:01 +0000123}
124
125apex {
Cole Faust5aeb9fd2024-10-22 16:30:57 -0700126 name: "com.android.apex.apkrollback.test_v2",
127 manifest: "testdata/manifest_v2.json",
128 androidManifest: "testdata/AndroidManifest.xml",
129 file_contexts: ":apex.test-file_contexts",
130 key: "com.android.apex.apkrollback.test.key",
131 apps: ["TestAppAv2"],
132 installable: false,
133 updatable: false,
Mohammad Samiul Islame7e63a62020-01-16 13:55:49 +0000134}
135
136apex {
Cole Faust5aeb9fd2024-10-22 16:30:57 -0700137 name: "com.android.apex.apkrollback.test_v2Crashing",
138 manifest: "testdata/manifest_v2.json",
139 androidManifest: "testdata/AndroidManifest.xml",
140 file_contexts: ":apex.test-file_contexts",
141 key: "com.android.apex.apkrollback.test.key",
142 apps: ["TestAppACrashingV2"],
143 installable: false,
144 updatable: false,
Bob Badoure539dba2021-02-12 17:07:05 -0800145}