// Copyright (C) 2020 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"],
}

java_test_host {
    name: "CtsBlobStoreHostTestCases",
    team: "trendy_team_framework_backstage_power",
    defaults: ["cts_defaults"],
    srcs: ["src/**/*.java"],
    libs: [
        "tools-common-prebuilt",
        "cts-tradefed",
        "tradefed",
        "truth",
    ],
    static_libs: [
        "cts-statsd-atom-host-test-utils",
    ],
    // Tag this module as a cts test artifact
    test_suites: [
        "cts",
        "general-tests",
    ],
    data: [
        ":CtsBlobStoreHostTestHelper",
        ":CtsBlobStoreHostTestHelperDev",
        ":CtsBlobStoreHostTestHelperAssist",
    ],
    per_testcase_directory: true,
}

android_test_helper_app {
    name: "CtsBlobStoreHostTestHelper",
    srcs: ["test-apps/BlobStoreHostTestHelper/src/**/*.java"],
    static_libs: [
        "compatibility-device-util-axt",
        "androidx.test.ext.junit",
        "androidx.test.rules",
        "BlobStoreTestUtils",
        "truth",
        "testng",
    ],
    manifest: "test-apps/BlobStoreHostTestHelper/AndroidManifest.xml",
    sdk_version: "test_current",
    // Tag this module as a cts test artifact
    test_suites: [
        "general-tests",
    ],
}

android_test_helper_app {
    name: "CtsBlobStoreHostTestHelperDev",
    srcs: ["test-apps/BlobStoreHostTestHelper/src/**/*.java"],
    static_libs: [
        "compatibility-device-util-axt",
        "androidx.test.ext.junit",
        "androidx.test.rules",
        "BlobStoreTestUtils",
        "truth",
        "testng",
    ],
    manifest: "test-apps/BlobStoreHostTestHelper/AndroidManifest_withPrivPerm.xml",
    aaptflags: [
        "--rename-manifest-package com.android.cts.device.blob.dev",
        "--rename-instrumentation-target-package com.android.cts.device.blob.dev",
    ],
    sdk_version: "test_current",
    // Tag this module as a cts test artifact
    test_suites: [
        "general-tests",
    ],
}

android_test_helper_app {
    name: "CtsBlobStoreHostTestHelperAssist",
    srcs: ["test-apps/BlobStoreHostTestHelper/src/**/*.java"],
    static_libs: [
        "compatibility-device-util-axt",
        "androidx.test.ext.junit",
        "androidx.test.rules",
        "BlobStoreTestUtils",
        "truth",
        "testng",
    ],
    manifest: "test-apps/BlobStoreHostTestHelper/AndroidManifest_withAssistRole.xml",
    aaptflags: [
        "--rename-manifest-package com.android.cts.device.blob.assist",
        "--rename-instrumentation-target-package com.android.cts.device.blob.assist",
    ],
    sdk_version: "test_current",
    // Tag this module as a cts test artifact
    test_suites: [
        "general-tests",
    ],
}