Home | History | Annotate | Download | only in coretests
      1 android_test {
      2     name: "FrameworksCoreTests",
      3 
      4     srcs: [
      5         "src/**/*.java",
      6         "src/**/I*.aidl",
      7         "DisabledTestApp/src/**/*.java",
      8         "EnabledTestApp/src/**/*.java",
      9         "BinderProxyCountingTestApp/src/**/*.java",
     10         "BinderProxyCountingTestService/src/**/*.java",
     11         "aidl/**/I*.aidl",
     12     ],
     13 
     14     aidl: {
     15         local_include_dirs: ["aidl"],
     16     },
     17 
     18     dxflags: ["--core-library"],
     19 
     20     aaptflags: [
     21         "-0 .dat",
     22         "-0 .gld",
     23         "-c fa",
     24     ],
     25     static_libs: [
     26         "frameworks-base-testutils",
     27         "core-tests-support",
     28         "android-common",
     29         "frameworks-core-util-lib",
     30         "mockwebserver",
     31         "guava",
     32         "androidx.test.espresso.core",
     33         "androidx.test.ext.junit",
     34         "androidx.test.runner",
     35         "androidx.test.rules",
     36         "mockito-target-minus-junit4",
     37         "ub-uiautomator",
     38         "platform-test-annotations",
     39         "truth-prebuilt",
     40         "print-test-util-lib",
     41         "testng",
     42     ],
     43 
     44     libs: [
     45         "android.test.runner",
     46         "telephony-common",
     47         "testables",
     48         "org.apache.http.legacy",
     49         "android.test.base",
     50         "android.test.mock",
     51         "framework-atb-backward-compatibility",
     52     ],
     53 
     54     platform_apis: true,
     55     test_suites: ["device-tests"],
     56 
     57     certificate: "platform",
     58 
     59     resource_dirs: ["res"],
     60     resource_zips: [":FrameworksCoreTests_apks_as_resources"],
     61 }
     62 
     63 // Rules to copy all the test apks to the intermediate raw resource directory
     64 java_genrule {
     65     name: "FrameworksCoreTests_apks_as_resources",
     66     srcs: [
     67         ":FrameworksCoreTests_install",
     68         ":FrameworksCoreTests_install_bad_dex",
     69         ":FrameworksCoreTests_install_complete_package_info",
     70         ":FrameworksCoreTests_install_decl_perm",
     71         ":FrameworksCoreTests_install_jni_lib_open_from_apk",
     72         ":FrameworksCoreTests_install_loc_auto",
     73         ":FrameworksCoreTests_install_loc_internal",
     74         ":FrameworksCoreTests_install_loc_sdcard",
     75         ":FrameworksCoreTests_install_loc_unspecified",
     76         ":FrameworksCoreTests_install_multi_package",
     77         ":FrameworksCoreTests_install_split_base",
     78         ":FrameworksCoreTests_install_split_feature_a",
     79         ":FrameworksCoreTests_install_use_perm_good",
     80         ":FrameworksCoreTests_install_uses_feature",
     81         ":FrameworksCoreTests_install_verifier_bad",
     82         ":FrameworksCoreTests_install_verifier_good",
     83         ":FrameworksCoreTests_keyset_permdef_sa_unone",
     84         ":FrameworksCoreTests_keyset_permuse_sa_ua_ub",
     85         ":FrameworksCoreTests_keyset_permuse_sb_ua_ub",
     86         ":FrameworksCoreTests_keyset_sab_ua",
     87         ":FrameworksCoreTests_keyset_sa_ua",
     88         ":FrameworksCoreTests_keyset_sa_uab",
     89         ":FrameworksCoreTests_keyset_sa_ua_ub",
     90         ":FrameworksCoreTests_keyset_sa_ub",
     91         ":FrameworksCoreTests_keyset_sa_unone",
     92         ":FrameworksCoreTests_keyset_sau_ub",
     93         ":FrameworksCoreTests_keyset_sb_ua",
     94         ":FrameworksCoreTests_keyset_sb_ub",
     95         ":FrameworksCoreTests_keyset_splata_api",
     96         ":FrameworksCoreTests_keyset_splat_api",
     97         ":FrameworksCoreTests_locales",
     98         ":FrameworksCoreTests_version_1",
     99         ":FrameworksCoreTests_version_1_diff",
    100         ":FrameworksCoreTests_version_1_nosys",
    101         ":FrameworksCoreTests_version_2",
    102         ":FrameworksCoreTests_version_2_diff",
    103         ":FrameworksCoreTests_version_3",
    104     ],
    105     out: ["FrameworkCoreTests_apks_as_resources.res.zip"],
    106     tools: ["soong_zip"],
    107 
    108     cmd: "mkdir -p $(genDir)/res/raw && " +
    109         "for i in $(in); do " +
    110         "  x=$${i##*FrameworksCoreTests_}; echo $${x}; cp $$i $(genDir)/res/raw/$${x%.apk};" +
    111         "done && " +
    112         "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
    113 }
    114