Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 1 | // Copyright (C) 2021 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
Bob Badour | a7548b5 | 2022-01-27 22:04:48 -0800 | [diff] [blame] | 14 | |
Bob Badour | 390b27e | 2021-03-19 04:22:23 -0700 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
Bob Badour | a7548b5 | 2022-01-27 22:04:48 -0800 | [diff] [blame] | 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 390b27e | 2021-03-19 04:22:23 -0700 | [diff] [blame] | 18 | } |
| 19 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 20 | // Source code used for test |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 21 | filegroup { |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 22 | name: "launcher-tests-src", |
Thales Lima | a101290 | 2022-01-13 17:58:42 +0000 | [diff] [blame] | 23 | srcs: [ |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 24 | "src/**/*.java", |
| 25 | "src/**/*.kt", |
Sunny Goyal | 0f4bc92 | 2024-05-06 11:31:26 -0700 | [diff] [blame] | 26 | "multivalentTests/src/**/*.java", |
| 27 | "multivalentTests/src/**/*.kt", |
Thales Lima | a101290 | 2022-01-13 17:58:42 +0000 | [diff] [blame] | 28 | ], |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 29 | exclude_srcs: [ |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 30 | ":launcher-non-quickstep-tests-src", |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 31 | ], |
| 32 | } |
| 33 | |
Kevin Lim | a14145a | 2024-03-19 18:56:34 +0000 | [diff] [blame] | 34 | filegroup { |
| 35 | name: "launcher3-robo-src", |
| 36 | // multivalentTests directory is a shared folder for not only robolectric converted test |
| 37 | // classes but also shared helper classes. |
| 38 | srcs: [ |
| 39 | "multivalentTests/src/**/*.java", |
| 40 | "multivalentTests/src/**/*.kt", |
Sunny Goyal | 0f4bc92 | 2024-05-06 11:31:26 -0700 | [diff] [blame] | 41 | "src_deviceless/**/*.java", |
| 42 | "src_deviceless/**/*.kt", |
Kevin Lim | a14145a | 2024-03-19 18:56:34 +0000 | [diff] [blame] | 43 | ], |
| 44 | } |
| 45 | |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 46 | // Source code used for non-quickstep tests |
| 47 | filegroup { |
| 48 | name: "launcher-non-quickstep-tests-src", |
| 49 | srcs: [ |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 50 | "src/com/android/launcher3/nonquickstep/**/*.java", |
| 51 | "src/com/android/launcher3/nonquickstep/**/*.kt", |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 52 | ], |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | // Source code used for oop test helpers |
| 56 | filegroup { |
| 57 | name: "launcher-oop-tests-src", |
| 58 | srcs: [ |
Sunny Goyal | 5ca5049 | 2024-03-18 14:50:48 -0700 | [diff] [blame] | 59 | ":launcher-testing-helpers", |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 60 | "src/com/android/launcher3/allapps/TaplOpenCloseAllAppsTest.java", |
| 61 | "src/com/android/launcher3/allapps/TaplAllAppsIconsWorkingTest.java", |
| 62 | "src/com/android/launcher3/appiconmenu/TaplAppIconMenuTest.java", |
| 63 | "src/com/android/launcher3/dragging/TaplDragTest.java", |
| 64 | "src/com/android/launcher3/dragging/TaplUninstallRemoveTest.java", |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 65 | "src/com/android/launcher3/ui/TaplTestsLauncher3Test.java", |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 66 | "src/com/android/launcher3/ui/workspace/TaplWorkspaceTest.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 67 | ], |
| 68 | } |
| 69 | |
| 70 | // Library with all the dependencies for building quickstep |
| 71 | android_library { |
| 72 | name: "Launcher3TestLib", |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 73 | defaults: [ |
| 74 | "launcher_compose_tests_defaults", |
| 75 | ], |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 76 | srcs: [], |
Sebastian Franco | e7c3d3d | 2023-01-10 10:47:46 -0600 | [diff] [blame] | 77 | asset_dirs: ["assets"], |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 78 | resource_dirs: ["res"], |
| 79 | static_libs: [ |
Anushree Ganjam | d1a28fe | 2023-08-23 21:40:57 -0700 | [diff] [blame] | 80 | "flag-junit-base", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 81 | "launcher-aosp-tapl", |
Sunny Goyal | 177785e | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 82 | "androidx.test.core", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 83 | "androidx.test.runner", |
| 84 | "androidx.test.rules", |
| 85 | "androidx.test.ext.junit", |
| 86 | "androidx.test.espresso.core", |
| 87 | "androidx.test.espresso.contrib", |
| 88 | "androidx.test.espresso.intents", |
| 89 | "androidx.test.uiautomator_uiautomator", |
Brian Isganitis | 06139e0 | 2023-10-03 16:02:39 -0400 | [diff] [blame] | 90 | "mockito-kotlin2", |
Anushree Ganjam | 94efd7a | 2023-08-24 18:28:19 -0700 | [diff] [blame] | 91 | "mockito-target-extended-minus-junit4", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 92 | "launcher_log_protos_lite", |
Krzysztof KosiĆski | 6e3b7a6 | 2023-10-10 06:50:28 +0000 | [diff] [blame] | 93 | "truth", |
Uwais Ashraf | 6e9927e | 2024-03-25 10:53:06 +0000 | [diff] [blame] | 94 | "kotlinx_coroutines_test", |
vadimt | 13839e4 | 2022-02-17 13:56:06 -0800 | [diff] [blame] | 95 | "platform-test-rules", |
Pat Manning | da69661 | 2023-02-17 15:06:58 +0000 | [diff] [blame] | 96 | "testables", |
Anushree Ganjam | 2a14b97 | 2023-08-30 13:31:10 -0700 | [diff] [blame] | 97 | "com_android_launcher3_flags_lib", |
Jeremy Sim | 9e44e37 | 2023-10-10 14:54:39 -0700 | [diff] [blame] | 98 | "com_android_wm_shell_flags_lib", |
Willie Koomson | fedc18e | 2023-11-07 22:31:46 +0000 | [diff] [blame] | 99 | "android.appwidget.flags-aconfig-java", |
Sunny Goyal | 0b7f4cf | 2024-10-17 09:44:25 -0700 | [diff] [blame] | 100 | "platform-parametric-runner-lib", |
| 101 | "kotlin-reflect", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 102 | ], |
| 103 | manifest: "AndroidManifest-common.xml", |
| 104 | platform_apis: true, |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 105 | // TODO(b/319712088): re-enable use_resource_processor |
| 106 | use_resource_processor: false, |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 107 | } |
| 108 | |
My Name | 5b59e75 | 2021-12-15 20:54:45 -0500 | [diff] [blame] | 109 | android_library { |
| 110 | name: "Launcher3TestResources", |
| 111 | resource_dirs: ["res"], |
Sihua Ma | 1593bb4 | 2024-04-26 18:42:58 +0000 | [diff] [blame] | 112 | asset_dirs: ["assets"], |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 113 | // TODO(b/319712088): re-enable use_resource_processor |
| 114 | use_resource_processor: false, |
Sunny Goyal | 0b7f4cf | 2024-10-17 09:44:25 -0700 | [diff] [blame] | 115 | static_libs: [ |
| 116 | "kotlin-reflect", |
| 117 | ], |
My Name | 5b59e75 | 2021-12-15 20:54:45 -0500 | [diff] [blame] | 118 | } |
| 119 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 120 | android_test { |
| 121 | name: "Launcher3Tests", |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 122 | defaults: [ |
| 123 | "launcher_compose_tests_defaults", |
| 124 | ], |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 125 | srcs: [ |
| 126 | ":launcher-tests-src", |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 127 | ":launcher-non-quickstep-tests-src", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 128 | ], |
Anushree Ganjam | d1a28fe | 2023-08-23 21:40:57 -0700 | [diff] [blame] | 129 | static_libs: [ |
| 130 | "Launcher3TestLib", |
Anushree Ganjam | 2a14b97 | 2023-08-30 13:31:10 -0700 | [diff] [blame] | 131 | "com_android_launcher3_flags_lib", |
Anushree Ganjam | d1a28fe | 2023-08-23 21:40:57 -0700 | [diff] [blame] | 132 | ], |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 133 | libs: [ |
Jihoon Kang | 9f8e4b6 | 2024-08-30 00:29:41 +0000 | [diff] [blame] | 134 | "android.test.base.stubs.system", |
| 135 | "android.test.runner.stubs.system", |
| 136 | "android.test.mock.stubs.system", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 137 | ], |
Anushree Ganjam | 94efd7a | 2023-08-24 18:28:19 -0700 | [diff] [blame] | 138 | // Libraries used by mockito inline extended |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 139 | jni_libs: [ |
| 140 | "libdexmakerjvmtiagent", |
| 141 | "libstaticjvmtiagent", |
| 142 | ], |
| 143 | use_embedded_native_libs: false, |
| 144 | compile_multilib: "both", |
| 145 | instrumentation_for: "Launcher3", |
| 146 | manifest: "AndroidManifest.xml", |
| 147 | platform_apis: true, |
| 148 | test_config: "Launcher3Tests.xml", |
Vadim Tryshev | 990a32e | 2023-03-02 21:51:21 +0000 | [diff] [blame] | 149 | data: [":Launcher3"], |
Anushree Ganjam | ef2c5c0 | 2024-10-22 11:52:31 -0700 | [diff] [blame] | 150 | plugins: ["dagger2-compiler"], |
Vadim Tryshev | 990a32e | 2023-03-02 21:51:21 +0000 | [diff] [blame] | 151 | test_suites: ["general-tests"], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 152 | } |
Nicolo' Mazzucato | e8ee34a | 2023-01-24 15:41:10 +0000 | [diff] [blame] | 153 | |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 154 | filegroup { |
Sihua Ma | a9e4324 | 2024-08-23 22:13:33 +0000 | [diff] [blame] | 155 | name: "launcher-testing-helpers-robo", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 156 | srcs: [ |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 157 | "src/**/*.java", |
| 158 | "src/**/*.kt", |
| 159 | "multivalentTests/src/**/*.java", |
| 160 | "multivalentTests/src/**/*.kt", |
Uwais Ashraf | 9c2f5a4 | 2024-03-04 09:49:39 +0000 | [diff] [blame] | 161 | "src/com/android/launcher3/ui/AbstractLauncherUiTest.java", |
Sunny Goyal | cac373c | 2024-11-07 10:17:57 -0800 | [diff] [blame] | 162 | "src/com/android/launcher3/ui/BaseLauncherTaplTest.java", |
Uwais Ashraf | 9c2f5a4 | 2024-03-04 09:49:39 +0000 | [diff] [blame] | 163 | "tapl/com/android/launcher3/tapl/*.java", |
| 164 | "tapl/com/android/launcher3/tapl/*.kt", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 165 | ], |
| 166 | exclude_srcs: [ |
| 167 | // Test classes |
| 168 | "src/**/*Test.java", |
| 169 | "src/**/*Test.kt", |
Sihua Ma | 58e8573 | 2024-07-26 16:41:49 +0000 | [diff] [blame] | 170 | "src/**/RoboApiWrapper.kt", |
Uwais Ashraf | 77b97c0 | 2023-12-27 11:44:16 +0000 | [diff] [blame] | 171 | "multivalentTests/src/**/*Test.java", |
| 172 | "multivalentTests/src/**/*Test.kt", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 173 | ], |
| 174 | } |
| 175 | |
Sihua Ma | 58e8573 | 2024-07-26 16:41:49 +0000 | [diff] [blame] | 176 | filegroup { |
| 177 | name: "launcher-testing-helpers", |
| 178 | srcs: [ |
Sihua Ma | a9e4324 | 2024-08-23 22:13:33 +0000 | [diff] [blame] | 179 | ":launcher-testing-helpers-robo", |
Sihua Ma | 58e8573 | 2024-07-26 16:41:49 +0000 | [diff] [blame] | 180 | "src/**/RoboApiWrapper.kt", |
| 181 | ], |
| 182 | } |
| 183 | |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 184 | android_robolectric_test { |
| 185 | enabled: true, |
| 186 | name: "Launcher3RoboTests", |
| 187 | srcs: [ |
Kevin Lim | a14145a | 2024-03-19 18:56:34 +0000 | [diff] [blame] | 188 | ":launcher3-robo-src", |
Sihua Ma | a9e4324 | 2024-08-23 22:13:33 +0000 | [diff] [blame] | 189 | ":launcher-testing-helpers-robo", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 190 | ], |
| 191 | exclude_srcs: [ |
Uwais Ashraf | 77b97c0 | 2023-12-27 11:44:16 +0000 | [diff] [blame] | 192 | //"src/com/android/launcher3/util/CellContentDimensionsTest.kt", // Failing - b/316553889 |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 193 | |
| 194 | // requires modification to work with inline mock maker |
| 195 | "src/com/android/launcher3/util/rule/StaticMockitoRule.java", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 196 | ], |
| 197 | java_resource_dirs: ["config"], |
| 198 | static_libs: [ |
| 199 | "flag-junit-base", |
Uwais Ashraf | 784b4f2 | 2024-05-21 15:42:34 +0000 | [diff] [blame] | 200 | "flag-junit", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 201 | "com_android_launcher3_flags_lib", |
| 202 | "com_android_wm_shell_flags_lib", |
| 203 | "androidx.test.uiautomator_uiautomator", |
| 204 | "androidx.core_core-animation-testing", |
| 205 | "androidx.test.ext.junit", |
Sihua Ma | 350c29a | 2024-05-23 22:03:42 +0000 | [diff] [blame] | 206 | "androidx.test.espresso.core", |
| 207 | "androidx.test.espresso.contrib", |
| 208 | "androidx.test.espresso.intents", |
Sihua Ma | 444b8e6 | 2024-03-21 21:50:20 +0000 | [diff] [blame] | 209 | "androidx.test.rules", |
Uwais Ashraf | 7a0150d | 2024-04-08 20:59:23 +0000 | [diff] [blame] | 210 | "uiautomator-helpers", |
Uwais Ashraf | 029de6d | 2024-05-21 11:59:05 +0000 | [diff] [blame] | 211 | "inline-mockito-robolectric-prebuilt", |
| 212 | "mockito-kotlin-nodeps", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 213 | "platform-parametric-runner-lib", |
Uwais Ashraf | 784b4f2 | 2024-05-21 15:42:34 +0000 | [diff] [blame] | 214 | "platform-test-rules-deviceless", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 215 | "testables", |
| 216 | "Launcher3TestResources", |
| 217 | "SystemUISharedLib", |
| 218 | "launcher-testing-shared", |
Sihua Ma | de5ef62 | 2024-06-08 01:15:40 +0000 | [diff] [blame] | 219 | "android.appwidget.flags-aconfig-java", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 220 | ], |
| 221 | libs: [ |
Jihoon Kang | 9f8e4b6 | 2024-08-30 00:29:41 +0000 | [diff] [blame] | 222 | "android.test.runner.stubs.system", |
| 223 | "android.test.base.stubs.system", |
| 224 | "android.test.mock.stubs.system", |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 225 | "truth", |
| 226 | ], |
| 227 | instrumentation_for: "Launcher3", |
Anushree Ganjam | ef2c5c0 | 2024-10-22 11:52:31 -0700 | [diff] [blame] | 228 | plugins: ["dagger2-compiler"], |
Kevin Liu | a75ea0b | 2024-05-08 01:43:53 +0000 | [diff] [blame] | 229 | strict_mode: false, |
Uwais Ashraf | 861f2fd | 2023-12-19 10:09:25 +0000 | [diff] [blame] | 230 | } |