diff options
author | Ang Li <ihcinihsdk@google.com> | 2023-05-15 17:01:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-05-15 17:01:53 +0000 |
commit | 3ef1468e2c27f5c4903872025117c47bfa47125b (patch) | |
tree | 1fa07feb3790cb0101e51d9646a0f810c1358643 | |
parent | 6660b73edd97a19ea275f13329641cc28d474ce1 (diff) | |
parent | ec16321c9de5e3a464531f16e5d3bb2d92d2d8d1 (diff) | |
download | robolectric-3ef1468e2c27f5c4903872025117c47bfa47125b.tar.gz |
Merge "Add Android.bp file for RNG regression tests." into udc-dev
-rw-r--r-- | integration_tests/nativegraphics/Android.bp | 58 | ||||
-rw-r--r-- | integration_tests/nativegraphics/config/robolectric.properties | 15 | ||||
-rw-r--r-- | integration_tests/nativegraphics/robo-manifest.xml | 16 |
3 files changed, 89 insertions, 0 deletions
diff --git a/integration_tests/nativegraphics/Android.bp b/integration_tests/nativegraphics/Android.bp new file mode 100644 index 000000000..52713c3a1 --- /dev/null +++ b/integration_tests/nativegraphics/Android.bp @@ -0,0 +1,58 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +android_library { + name: "NativeGraphicsTestsAssetsLib", + asset_dirs: ["src/main/assets"], + resource_dirs: ["src/main/res"], + sdk_version: "current", + platform_apis: true, + manifest: "AndroidManifest.xml", + optimize: { + enabled: false + }, +} + +android_app { + name: "NativeGraphicsPseudoApp", + srcs: [], + static_libs: ["NativeGraphicsTestsAssetsLib"], + manifest: "robo-manifest.xml", + aaptflags: [ + "--extra-packages", + "org.robolectric.integrationtests.nativegraphics", + ], + dont_merge_manifests: true, + platform_apis: true, + system_ext_specific: true, + certificate: "platform", + privileged: true, + resource_dirs: ["src/main/res"], + kotlincflags: ["-Xjvm-default=all"], + + plugins: ["dagger2-compiler"], +} + +android_robolectric_test { + name: "NativeGraphicsTests", + srcs: [ + "src/**/*.kt", + "src/**/*.java", + ], + static_libs: [ + "androidx.core_core", + "androidx.test.uiautomator_uiautomator", + "androidx.test.ext.junit", + "inline-mockito-robolectric-prebuilt", + ], + libs: [ + "android.test.runner", + "android.test.base", + "android.test.mock", + "truth-prebuilt", + ], + upstream: true, + java_resource_dirs: ["config"], + instrumentation_for: "NativeGraphicsPseudoApp", +} diff --git a/integration_tests/nativegraphics/config/robolectric.properties b/integration_tests/nativegraphics/config/robolectric.properties new file mode 100644 index 000000000..0d16e6b27 --- /dev/null +++ b/integration_tests/nativegraphics/config/robolectric.properties @@ -0,0 +1,15 @@ +# 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. +# +sdk=NEWEST_SDK diff --git a/integration_tests/nativegraphics/robo-manifest.xml b/integration_tests/nativegraphics/robo-manifest.xml new file mode 100644 index 000000000..2efd092c1 --- /dev/null +++ b/integration_tests/nativegraphics/robo-manifest.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!--- Include all the namespaces we will ever need anywhere, because this is the source the manifest merger uses for namespaces --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" + xmlns:tools="http://schemas.android.com/tools" + package="org.robolectric.integrationtests.nativegraphics" + android:sharedUserId="android.uid.phone" + coreApp="true"> + <application> + <activity + android:name="com.android.systemui.testing.screenshot.ScreenshotActivity" + android:exported="true"> + </activity> + </application> +</manifest> |