diff options
| author | 2020-03-26 02:55:10 +0000 | |
|---|---|---|
| committer | 2020-03-26 02:55:10 +0000 | |
| commit | 2be42fbead03c723769414e2d2a460ffac59d7e4 (patch) | |
| tree | 10e5ebfa7a57bb34f409005e2f527ecc1120bafc | |
| parent | 0cb6d3fd3d0ce3db8c9f3336c86c2d7fc594d81b (diff) | |
| parent | 91f2ff9718f79045c38ee2ad36b309c314930c90 (diff) | |
Merge "Add Tuner Resource Manager Test as Presubmit test" into rvc-dev
5 files changed, 99 insertions, 0 deletions
diff --git a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/Android.bp b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/Android.bp new file mode 100644 index 000000000000..eb1a2921136d --- /dev/null +++ b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/Android.bp @@ -0,0 +1,37 @@ +android_test { + name: "TunerResourceManagerTests", + + // Include all test java files. + srcs: [ + "*.java", + ], + + static_libs: [ + "frameworks-base-testutils", + "services.core", + "services.devicepolicy", + "guava", + "androidx.test.core", + "androidx.test.ext.truth", + "androidx.test.runner", + "androidx.test.rules", + "mockito-target-minus-junit4", + "platform-test-annotations", + "truth-prebuilt", + "testables", + "testng", + "servicestests-utils", + "service-permission", + + ], + + libs: [ + "android.test.mock", + "android.test.base", + "android.test.runner", + ], + + platform_apis: true, + test_suites: ["general-tests", "device-tests"], + compile_multilib: "both", +}
\ No newline at end of file diff --git a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/AndroidManifest.xml b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/AndroidManifest.xml new file mode 100644 index 000000000000..9fa100d5a041 --- /dev/null +++ b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/AndroidManifest.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2020 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.server.tv.tunerresourcemanager"> + <application> + <uses-library android:name="android.test.runner" /> + </application> + <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" + android:targetPackage="com.android.server.tv.tunerresourcemanager" + android:label="Tuner Resource Manager Test Cases"> + </instrumentation> +</manifest> + + + diff --git a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/AndroidTest.xml b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/AndroidTest.xml new file mode 100644 index 000000000000..e3ea6a06a115 --- /dev/null +++ b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/AndroidTest.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2020 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. +--> +<configuration description="Runs Tests for Tuner Resource Manager"> + <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup"> + <option name="test-file-name" value="TunerResourceManagerTests.apk" /> + </target_preparer> + + <option name="test-suite-tag" value="apct" /> + <option name="test-suite-tag" value="framework-base-presubmit" /> + <option name="test-tag" value="TunerResourceManagerTests" /> + <test class="com.android.tradefed.testtype.AndroidJUnitTest" > + <option name="package" value="com.android.server.tv.tunerresourcemanager" /> + <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" /> + <option name="hidden-api-checks" value="false"/> + </test> +</configuration>
\ No newline at end of file diff --git a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java index 155c6ddd4507..fcbd5072ae35 100644 --- a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java @@ -34,6 +34,7 @@ import android.media.tv.tunerresourcemanager.TunerFrontendInfo; import android.media.tv.tunerresourcemanager.TunerFrontendRequest; import android.media.tv.tunerresourcemanager.TunerResourceManager; import android.os.RemoteException; +import android.platform.test.annotations.Presubmit; import androidx.test.InstrumentationRegistry; import androidx.test.filters.SmallTest; @@ -54,6 +55,7 @@ import java.util.Map; * Tests for {@link TunerResourceManagerService} class. */ @SmallTest +@Presubmit @RunWith(JUnit4.class) public class TunerResourceManagerServiceTest { private static final String TAG = "TunerResourceManagerServiceTest"; diff --git a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/UseCasePriorityHintsTest.java b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/UseCasePriorityHintsTest.java index ab5665ba99fc..2ff178eba3e1 100644 --- a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/UseCasePriorityHintsTest.java +++ b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/UseCasePriorityHintsTest.java @@ -18,6 +18,7 @@ package com.android.server.tv.tunerresourcemanager; import static com.google.common.truth.Truth.assertThat; import android.media.tv.TvInputService; +import android.platform.test.annotations.Presubmit; import android.util.Slog; import androidx.test.filters.SmallTest; @@ -36,6 +37,7 @@ import java.nio.charset.StandardCharsets; * Tests for {@link UseCasePriorityHints} class. */ @SmallTest +@Presubmit @RunWith(JUnit4.class) public class UseCasePriorityHintsTest { private static final String TAG = "UseCasePriorityHintsTest"; |