// 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.

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

android_test {
    name: "RollbackTest",
    manifest: "RollbackTest/AndroidManifest.xml",
    platform_apis: true,
    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",
        ":test.rebootless_apex_v2",
    ],
}

java_test_host {
    name: "StagedRollbackTest",
    srcs: ["StagedRollbackTest/src/**/*.java"],
    libs: ["tradefed"],
    static_libs: [
        "compatibility-tradefed",
        "frameworks-base-hostutils",
        "RollbackTestLib",
        "testng",
    ],
    test_suites: ["general-tests"],
    test_config: "StagedRollbackTest.xml",
    device_common_data: [
        ":com.android.apex.apkrollback.test_v1",
        ":test.rebootless_apex_v1",
        ":RollbackTest",
    ],
}

java_test_host {
    name: "NetworkStagedRollbackTest",
    srcs: ["NetworkStagedRollbackTest/src/**/*.java"],
    libs: ["tradefed"],
    static_libs: [
        "RollbackTestLib",
        "frameworks-base-hostutils",
    ],
    test_suites: ["general-tests"],
    test_config: "NetworkStagedRollbackTest.xml",
    device_common_data: [":RollbackTest"],
}

java_test_host {
    name: "MultiUserRollbackTest",
    srcs: ["MultiUserRollbackTest/src/**/*.java"],
    libs: ["tradefed"],
    static_libs: [
        "frameworks-base-hostutils",
    ],
    test_suites: ["general-tests"],
    test_config: "MultiUserRollbackTest.xml",
    device_common_data: [":RollbackTest"],
}

java_library_host {
    name: "RollbackTestLib",
    srcs: ["lib/src/**/*.java"],
    libs: ["tradefed"],
}

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,
    updatable: 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,
    updatable: 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,
    updatable: false,
}
