By classifying the tests into 2 categories, we can: 1) run remaining tests with network disabled to reduce the interference of network crashes. 2) make it easier to identify bugs caused by network stack or problems in rollback infra. Note this CL contains stubs only. We will move actual test code later. Bug: 147785893 Test: m Change-Id: I5ecc63a057e9a115ea3aa446970a3f20dff750d0
104 lines
3.2 KiB
Plaintext
104 lines
3.2 KiB
Plaintext
// 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.
|
|
|
|
android_test {
|
|
name: "RollbackTest",
|
|
manifest: "RollbackTest/AndroidManifest.xml",
|
|
srcs: ["RollbackTest/src/**/*.java"],
|
|
static_libs: ["androidx.test.rules", "cts-rollback-lib", "cts-install-lib"],
|
|
test_suites: ["general-tests"],
|
|
test_config: "RollbackTest.xml",
|
|
java_resources: [
|
|
":com.android.apex.apkrollback.test_v2",
|
|
":com.android.apex.apkrollback.test_v2Crashing"
|
|
],
|
|
}
|
|
|
|
java_test_host {
|
|
name: "StagedRollbackTest",
|
|
srcs: ["StagedRollbackTest/src/**/*.java"],
|
|
libs: ["tradefed"],
|
|
static_libs: ["testng", "compatibility-tradefed"],
|
|
test_suites: ["general-tests"],
|
|
test_config: "StagedRollbackTest.xml",
|
|
data: [":com.android.apex.apkrollback.test_v1"],
|
|
}
|
|
|
|
java_test_host {
|
|
name: "NetworkStagedRollbackTest",
|
|
srcs: ["NetworkStagedRollbackTest/src/**/*.java"],
|
|
libs: ["tradefed"],
|
|
static_libs: ["testng"],
|
|
test_suites: ["general-tests"],
|
|
test_config: "NetworkStagedRollbackTest.xml",
|
|
}
|
|
|
|
java_test_host {
|
|
name: "MultiUserRollbackTest",
|
|
srcs: ["MultiUserRollbackTest/src/**/*.java"],
|
|
libs: ["tradefed"],
|
|
test_suites: ["general-tests"],
|
|
test_config: "MultiUserRollbackTest.xml",
|
|
}
|
|
|
|
genrule {
|
|
name: "com.android.apex.apkrollback.test.pem",
|
|
out: ["com.android.apex.apkrollback.test.pem"],
|
|
cmd: "openssl genrsa -out $(out) 4096",
|
|
}
|
|
|
|
genrule {
|
|
name: "com.android.apex.apkrollback.test.pubkey",
|
|
srcs: [":com.android.apex.apkrollback.test.pem"],
|
|
out: ["com.android.apex.apkrollback.test.pubkey"],
|
|
tools: ["avbtool"],
|
|
cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)",
|
|
}
|
|
|
|
apex_key {
|
|
name: "com.android.apex.apkrollback.test.key",
|
|
private_key: ":com.android.apex.apkrollback.test.pem",
|
|
public_key: ":com.android.apex.apkrollback.test.pubkey",
|
|
installable: false,
|
|
}
|
|
|
|
apex {
|
|
name: "com.android.apex.apkrollback.test_v1",
|
|
manifest: "testdata/manifest_v1.json",
|
|
androidManifest: "testdata/AndroidManifest.xml",
|
|
file_contexts: ":apex.test-file_contexts",
|
|
key: "com.android.apex.apkrollback.test.key",
|
|
apps: ["TestAppAv1"],
|
|
installable: false,
|
|
}
|
|
|
|
apex {
|
|
name: "com.android.apex.apkrollback.test_v2",
|
|
manifest: "testdata/manifest_v2.json",
|
|
androidManifest: "testdata/AndroidManifest.xml",
|
|
file_contexts: ":apex.test-file_contexts",
|
|
key: "com.android.apex.apkrollback.test.key",
|
|
apps: ["TestAppAv2"],
|
|
installable: false,
|
|
}
|
|
|
|
apex {
|
|
name: "com.android.apex.apkrollback.test_v2Crashing",
|
|
manifest: "testdata/manifest_v2.json",
|
|
androidManifest: "testdata/AndroidManifest.xml",
|
|
file_contexts: ":apex.test-file_contexts",
|
|
key: "com.android.apex.apkrollback.test.key",
|
|
apps: ["TestAppACrashingV2"],
|
|
installable: false,
|
|
} |