filegroup {
    name: "read_api_test_storage_files",
    srcs: [
        "data/v1/package_v1.map",
        "data/v1/flag_v1.map",
        "data/v1/flag_v1.val",
        "data/v1/flag_v1.info",
        "data/v2/package_v2.map",
        "data/v2/flag_v2.map",
        "data/v2/flag_v2.val",
        "data/v2/flag_v2.info",
    ],
}

rust_test {
    name: "aconfig_storage_read_api.test.rust",
    srcs: [
        "storage_read_api_test.rs",
    ],
    rustlibs: [
        "libanyhow",
        "libaconfig_storage_file",
        "libaconfig_storage_read_api",
        "librand",
    ],
    data: [
        ":read_api_test_storage_files",
    ],
    test_suites: ["general-tests"],
}

cc_test {
    name: "aconfig_storage_read_api.test.cpp",
    srcs: [
        "storage_read_api_test.cpp",
    ],
    static_libs: [
        "libgmock",
        "libaconfig_storage_read_api_cc",
        "libbase",
        "liblog",
    ],
    data: [
        ":read_api_test_storage_files",
    ],
    test_suites: [
        "device-tests",
        "general-tests",
    ],
}

android_test {
    name: "aconfig_storage_read_functional",
    srcs: [
        "functional/srcs/**/*.java",
    ],
    static_libs: [
        "aconfig_device_paths_java",
        "aconfig_storage_file_java",
        "androidx.test.rules",
        "libaconfig_storage_read_api_java",
        "junit",
    ],
    jni_libs: [
        "libaconfig_storage_read_api_rust_jni",
    ],
    data: [
        ":read_api_test_storage_files",
    ],
    platform_apis: true,
    certificate: "platform",
    test_suites: [
        "general-tests",
    ],
    test_config: "AconfigStorageReadFunctionalTest.xml",
    team: "trendy_team_android_core_experiments",
}

android_test {
    name: "aconfig_storage_read_unit",
    team: "trendy_team_android_core_experiments",
    srcs: [
        "unit/srcs/**/*.java",
    ],
    static_libs: [
        "androidx.test.runner",
        "junit",
        "aconfig_storage_reader_java",
    ],
    sdk_version: "test_current",
    data: [
        ":read_api_test_storage_files",
    ],
    test_suites: [
        "general-tests",
    ],
    test_config: "AconfigStorageReadUnitTest.xml",
    jarjar_rules: "jarjar.txt",
}
