cheets_GTS(_R): Ignore a certain error case form collect-tests-only.

Upstream GTS bug inevitably crashes this test and marks
the job as failed, but leaving the job in failed state
has bad side effect in moblab (making any CTS jobs incomplete).

As a workaround, we assume the job as completed as long
the test case count matches the expectation.

BUG=b:181176656
TEST=cheets_GTS.8.0_r3.tradefed-run-collect-tests-only-internal

Change-Id: I92708b846d22fb51db7af6561f29dc4c0c0ff6a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2730372
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org>
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
(cherry picked from commit cd62758fd0058a57d3c12971026322f463b12d98)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2879548
diff --git a/server/site_tests/cheets_GTS/control.8.0_r3.tradefed-run-collect-tests-only-internal b/server/site_tests/cheets_GTS/control.8.0_r3.tradefed-run-collect-tests-only-internal
index e2e67e6..811e1d4 100644
--- a/server/site_tests/cheets_GTS/control.8.0_r3.tradefed-run-collect-tests-only-internal
+++ b/server/site_tests/cheets_GTS/control.8.0_r3.tradefed-run-collect-tests-only-internal
@@ -30,6 +30,9 @@
         target_plan=None,
         uri='gs://chromeos-arc-images/cts/bundle/android-gts-8-R3-P-7133222.zip',
         use_jdk9=True,
+        # This module has a known crash bug (b/181176656). As long as the
+        # executed test count matches the known number, assume all tests ran.
+        executable_test_count=[1802, 3604, 5406, 7208],
         timeout=3600)
 
 parallel_simple(run_TS, machines)
diff --git a/server/site_tests/cheets_GTS/control.tradefed-run-collect-tests-only b/server/site_tests/cheets_GTS/control.tradefed-run-collect-tests-only
index 3cfa012..0789d34 100644
--- a/server/site_tests/cheets_GTS/control.tradefed-run-collect-tests-only
+++ b/server/site_tests/cheets_GTS/control.tradefed-run-collect-tests-only
@@ -31,6 +31,9 @@
         retry_manual_tests=True,
         use_jdk9=True,
         warn_on_test_retry=False,
+        # This module has a known crash bug (b/181176656). As long as the
+        # executed test count matches the known number, assume all tests ran.
+        executable_test_count=[1802, 3604, 5406, 7208],
         timeout=3600)
 
 parallel_simple(run_TS, machines)
diff --git a/server/site_tests/cheets_GTS_R/control.8.0_r3.tradefed-run-collect-tests-only-internal b/server/site_tests/cheets_GTS_R/control.8.0_r3.tradefed-run-collect-tests-only-internal
new file mode 100644
index 0000000..f9006cd
--- /dev/null
+++ b/server/site_tests/cheets_GTS_R/control.8.0_r3.tradefed-run-collect-tests-only-internal
@@ -0,0 +1,41 @@
+<<<<<<< HEAD   (e6337a cheets_GTS: Update the notest module list for GTS8.0r3.)
+=======
+# Copyright 2020 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file has been automatically generated. Do not edit!
+
+AUTHOR = 'ARC++ Team'
+NAME = 'cheets_GTS_R.8.0_r3.tradefed-run-collect-tests-only-internal'
+ATTRIBUTES = 'suite:arc-cts-r'
+DEPENDENCIES = 'arc'
+JOB_RETRIES = 0
+TEST_TYPE = 'server'
+TIME = 'LENGTHY'
+MAX_RESULT_SIZE_KB = 512000
+DOC = 'Run all of the Android Google Test Suite (GTS) in the ARC++ container.'
+
+def run_TS(machine):
+    host_list = [hosts.create_host(machine)]
+    job.run_test(
+        'cheets_GTS_R',
+        hosts=host_list,
+        iterations=1,
+        max_retry=0,
+        tag='8.0_r3.tradefed-run-collect-tests-only-internal',
+        test_name='cheets_GTS_R.8.0_r3.tradefed-run-collect-tests-only-internal',
+        authkey='gs://chromeos-arc-images/cts/bundle/gts-arc.json',
+        run_template=['run', 'commandAndExit', 'collect-tests-only', '--disable-reboot', '--module-arg', 'GtsYouTubeTestCases:skip-media-download:true'],
+        retry_template=None,
+        target_module=None,
+        target_plan=None,
+        uri='LATEST',
+        use_jdk9=True,
+        # This module has a known crash bug (b/181176656). As long as the
+        # executed test count matches the known number, assume all tests ran.
+        executable_test_count=[3654, 7308],
+        timeout=1800)
+
+parallel_simple(run_TS, machines)
+>>>>>>> CHANGE (cd6275 cheets_GTS(_R): Ignore a certain error case form collect-tes)
diff --git a/server/site_tests/cheets_GTS_R/control.tradefed-run-collect-tests-only b/server/site_tests/cheets_GTS_R/control.tradefed-run-collect-tests-only
index 3e51dfa..7b1c0af 100644
--- a/server/site_tests/cheets_GTS_R/control.tradefed-run-collect-tests-only
+++ b/server/site_tests/cheets_GTS_R/control.tradefed-run-collect-tests-only
@@ -31,6 +31,9 @@
         retry_manual_tests=True,
         use_jdk9=True,
         warn_on_test_retry=False,
+        # This module has a known crash bug (b/181176656). As long as the
+        # executed test count matches the known number, assume all tests ran.
+        executable_test_count=[3654, 7308],
         timeout=1800)
 
 parallel_simple(run_TS, machines)