Merge "Add STS exeptions to ValidateTestsAbi#testBinariesAbis" am: 44cf873500 am: ae1a2ea72d

Original change: https://android-review.googlesource.com/c/platform/cts/+/1551379

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib2307dbbad7615eecd7f54e7044c8cd6028fbaf8
diff --git a/tools/cts-tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java b/tools/cts-tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java
index 7586074..096db55 100644
--- a/tools/cts-tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java
+++ b/tools/cts-tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java
@@ -108,6 +108,16 @@
         "^CVE-\\d{4}-.+$"
     };
 
+    private static final String[] BINARY_SUFFIX_EXCEPTIONS = {
+        /**
+         * All STS test binaries rvc+ are in the form of *_sts32 or *_sts64.
+         *
+         * Many STS binaries are only feasible on a specific bitness so STS
+         * pushes the appropriate binary to compatible devices.
+         */
+        "_sts32", "_sts64",
+    };
+
     /**
      * Test that all apks have the same supported abis.
      * Sometimes, if a module is missing LOCAL_MULTILIB := both, we will end up with only one of
@@ -202,6 +212,11 @@
                 if (BINARY_EXCEPTIONS.contains(name)) {
                     return false;
                 }
+                for (String suffixException : BINARY_SUFFIX_EXCEPTIONS) {
+                    if (name.endsWith(suffixException)) {
+                        return false;
+                    }
+                }
                 File file = new File(dir, name);
                 if (file.isDirectory()) {
                     return false;