summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamiul Islam <samiul@google.com>2024-04-03 10:28:44 +0000
committerSamiul Islam <samiul@google.com>2024-04-03 10:38:18 +0000
commit3c36bcf0e3c4ac76d42d5ebab4ee77fb673919e8 (patch)
tree94d22599e3d7759702faaa26431b80ef67670453
parenteabb8a5619b0809e10084e1e255b1b4542817eea (diff)
downloadAdServices-3c36bcf0e3c4ac76d42d5ebab4ee77fb673919e8.tar.gz
Skip tests on devices that do no support AdServices module properly
When we enable small module in ag/24481315 these tests fail due to service being unable. Since these require the full module to work properly, they should be skipped on low-ram devices that will be loaded with small module. AdServicesDeviceSupportedRule doesn't exist on this branch. Replaced it with AdservicesTestHelper.isDeviceSupported(). Similar checks to skip go devices have been merged to this branch already, for example, change-id Ic7d560c34ddc27a62620161cb0da26ce869f7656. Only CTS tests are being updated. Bug: 331130774 Bug: 293842409 Test: Presbumit Merged-In: I0a4826a60d34dceb8adc0d27caf724721d2ac991 Change-Id: I0a4826a60d34dceb8adc0d27caf724721d2ac991
-rw-r--r--adservices/tests/cts/endtoends/permissions/noperm/src/com/android/adservices/tests/permissions/PermissionsNoPermTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/adservices/tests/cts/endtoends/permissions/noperm/src/com/android/adservices/tests/permissions/PermissionsNoPermTest.java b/adservices/tests/cts/endtoends/permissions/noperm/src/com/android/adservices/tests/permissions/PermissionsNoPermTest.java
index f152c7f42..d4127ecdb 100644
--- a/adservices/tests/cts/endtoends/permissions/noperm/src/com/android/adservices/tests/permissions/PermissionsNoPermTest.java
+++ b/adservices/tests/cts/endtoends/permissions/noperm/src/com/android/adservices/tests/permissions/PermissionsNoPermTest.java
@@ -41,11 +41,13 @@ import android.net.Uri;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
+import com.android.adservices.common.AdservicesTestHelper;
import com.android.adservices.common.CompatAdServicesTestUtils;
import com.android.compatibility.common.util.ShellUtils;
import com.android.modules.utils.build.SdkLevel;
import org.junit.After;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -68,6 +70,9 @@ public class PermissionsNoPermTest {
@Before
public void setup() {
+ // Skip the test if it runs on unsupported platforms
+ Assume.assumeTrue(AdservicesTestHelper.isDeviceSupported());
+
if (!SdkLevel.isAtLeastT()) {
overridePpapiAppAllowList();
CompatAdServicesTestUtils.setFlags();