cheets_CTS_P/R: Skip 64-bits tests on 32-bits ARC devices.

Otherwise it continues adding noise (false red alert)
onto our dashboard.

BUG=b:158528643
TEST=cheets_CTS_P.9.0_r16.arm.CtsDeqpTestCases.64 on Relm is skipped
TEST=cheets_CTS_P.9.0_r16.arm.CtsDeqpTestCases.32 on Relm is run

Change-Id: I3aabff11ec6b2ef3b2b9ee73ded96b845cc6c58c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2940362
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
Commit-Queue: Jiyoun Ha <jiyounha@chromium.org>
Reviewed-by: Jiyoun Ha <jiyounha@chromium.org>
(cherry picked from commit d50f9c9d416d28edb6c587fed449153dc2df85ca)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2952783
diff --git a/server/cros/tradefed/tradefed_test.py b/server/cros/tradefed/tradefed_test.py
index 1d8e6bf..d5b21aa 100644
--- a/server/cros/tradefed/tradefed_test.py
+++ b/server/cros/tradefed/tradefed_test.py
@@ -1346,6 +1346,19 @@
                         current_login.need_reboot(hard_reboot=hard_reboot)
                 self._ready_arc()
                 self._calculate_test_count_factor(bundle)
+
+                # Check the ABI list and skip (pass) the tests if not applicable.
+                # This needs to be done after _ready_arc() for reading the device's
+                # ABI list from the booted ARC instance.
+                if '--abi' in run_template:
+                    abi = run_template[run_template.index('--abi') + 1]
+                    abilist = self._get_abilist()
+                    if abilist and abi not in abilist:
+                        logging.info(
+                                'Specified ABI %s is not in the device ABI list %s. Skipping.',
+                                abi, abilist)
+                        return
+
                 self._run_commands(precondition_commands, ignore_status=True)
                 if use_helpers:
                     self._fetch_helpers_from_dut()