Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d63dae0b authored by Ang Li's avatar Ang Li Committed by Android (Google) Code Review
Browse files

Merge "Make changes to Settings Spa tests compatible with RNG." into main

parents 0f2ed21e fc72ea85
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -18,6 +18,14 @@ package {
    default_applicable_licenses: ["frameworks_base_license"],
}

filegroup {
    name: "SpaScreenshotTestRNGFiles",
    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
    ],
}

android_test {
    name: "SpaScreenshotTests",
    use_resource_processor: true,
@@ -36,6 +44,7 @@ android_test {
        "androidx.test.ext.junit",
        "androidx.test.runner",
        "mockito-target-minus-junit4",
        "platform-parametric-runner-lib",
        "platform-screenshot-diff-core",
    ],
    kotlincflags: ["-Xjvm-default=all"],
+74 −0
Original line number Diff line number Diff line
package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

android_library {
    name: "SpaRoboRNGTestsAssetsLib",
    asset_dirs: ["assets"],
    sdk_version: "current",
    platform_apis: true,
    manifest: "AndroidManifest.xml",
    optimize: {
        enabled: false,
    },
    use_resource_processor: true,
    resource_dirs: ["res"],
}

android_app {
    name: "SpaRoboApp",
    srcs: [],
    static_libs: [
        "androidx.test.espresso.core",
        "androidx.appcompat_appcompat",
        "flag-junit",
        "guava",
        "SpaLib",
        "SpaLibTestUtils",
        "SpaRoboRNGTestsAssetsLib",
        "platform-screenshot-diff-core",
        "PlatformComposeSceneTransitionLayoutTestsUtils",
    ],
    manifest: "robo-manifest.xml",
    aaptflags: [
        "--extra-packages",
        "com.android.settingslib.spa.screenshot",
    ],
    dont_merge_manifests: true,
    platform_apis: true,
    system_ext_specific: true,
    certificate: "platform",
    privileged: true,
    resource_dirs: [],
    kotlincflags: ["-Xjvm-default=all"],

    plugins: ["dagger2-compiler"],
    use_resource_processor: true,
}

android_robolectric_test {
    name: "SpaRoboRNGTests",
    srcs: [
        ":SpaScreenshotTestRNGFiles",
        ":flag-junit",
        ":platform-test-screenshot-rules",
    ],
    // Do not add any new libraries here, they should be added to SpaRoboApp above.
    static_libs: [
        "androidx.compose.runtime_runtime",
        "androidx.test.uiautomator_uiautomator",
        "androidx.test.ext.junit",
        "inline-mockito-robolectric-prebuilt",
        "platform-parametric-runner-lib",
        "uiautomator-helpers",
    ],
    libs: [
        "android.test.runner",
        "android.test.base",
        "android.test.mock",
        "truth",
    ],
    upstream: true,
    java_resource_dirs: ["config"],
    instrumentation_for: "SpaRoboApp",
}
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  Copyright (C) 2022 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.
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.settingslib.spa.screenshot">

    <uses-sdk android:minSdkVersion="21"/>
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
</manifest>
+28.1 KiB
Loading image diff...
Loading