Files
lawnchair/modules/widgetpicker/tests/Android.bp
Shamali Patwa 0b3a0df76a Add test for widget previews using remote views.
Bug: 408283627
Flag: EXEMPT independent module
Test: WidgetsGridScreenshotTest:widgetsGrid_remoteViews
Change-Id: I4ce8eb92269af13207180e50793e65e23958cd00
2025-05-19 13:12:10 -07:00

80 lines
2.8 KiB
Plaintext

// Copyright (C) 2025 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
default_applicable_licenses: ["Android-Apache-2.0"],
default_team: "trendy_team_launcher",
}
android_app {
name: "WidgetPickerTestApp",
defaults: [
"platform_app_defaults",
"SystemUI_optimized_defaults",
],
platform_apis: true,
privileged: true,
certificate: "platform",
system_ext_specific: true,
static_libs: [
"widget_picker_ui_components",
],
}
android_test {
name: "WidgetPickerScreenshotTests",
manifest: "AndroidManifest.xml",
srcs: [
"multivalentScreenshotTests/src/com/android/launcher3/widgetpicker/goldenpathmanager/WidgetPickerGoldenPathManager.kt",
"multivalentScreenshotTests/src/com/android/launcher3/widgetpicker/ui/components/FloatingToolbarScreenshotTest.kt",
"multivalentScreenshotTests/src/com/android/launcher3/widgetpicker/ui/components/WidgetsGridScreenshotTest.kt",
"multivalentScreenshotTests/src/com/android/launcher3/widgetpicker/ui/components/WidgetsGridTestSamples.kt",
],
platform_apis: true,
static_libs: [
"widget_picker_ui_components",
"collector-device-lib-platform",
"widget_picker_window_size_class",
"testables",
"androidx.compose.runtime_runtime",
"junit",
"androidx.test.ext.junit",
"androidx.test.rules",
"androidx.test.runner",
"platform-test-rules",
"platform-screenshot-diff-core",
"platform-parametric-runner-lib",
"ScreenshotComposeUtilsLib",
"SystemUI-res", // Theme.SystemUI (dragged in by ScreenshotComposeUtilsLib)
],
libs: [
"android.test.base.stubs.system",
"android.test.runner.stubs.system",
],
kotlincflags: ["-Xjvm-default=all"],
// Needed to compile native libs for cuttlefish
compile_multilib: "both",
// Needed to link mokito libraries to run unbundled
use_embedded_native_libs: false,
instrumentation_for: "WidgetPickerTestApp",
test_config: "WidgetPickerScreenshotTests.xml",
test_suites: ["device-tests"],
certificate: "platform",
asset_dirs: ["multivalentScreenshotTests/assets/widgetpicker_screenshots"],
resource_dirs: [
"multivalentScreenshotTests/res",
],
}