faft: Add new suite and tast control file

To schedule 3 new tests in the quota pool, we need to define a new suite
and tast control file.

BUG=b:232974878
TEST=test_that suite:faft_detachable

Cq-Depend: chromium:3652888
Change-Id: Idb526f6e74a1896573ac8733c020cba19392d8bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/3653125
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keigo Oka <oka@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
diff --git a/server/site_tests/tast/control.firmware-detachable b/server/site_tests/tast/control.firmware-detachable
new file mode 100644
index 0000000..b831e73
--- /dev/null
+++ b/server/site_tests/tast/control.firmware-detachable
@@ -0,0 +1,45 @@
+# Copyright 2022 The ChromiumOS Authors.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from autotest_lib.client.common_lib import utils
+from autotest_lib.server.site_tests.tast import tast
+
+AUTHOR = 'Chromium OS Firmware EngProd team'
+NAME = 'tast.firmware-detachables'
+TIME = 'LENGTHY'
+TEST_TYPE = 'Server'
+DEPENDENCIES = 'servo_state:WORKING'
+ATTRIBUTES = 'suite:faft_detachable'
+MAX_RESULT_SIZE_KB = 1024 * 1024
+PY_VERSION = 3
+JOB_RETRIES = 0
+
+# tast.py uses binaries installed from autotest_server_package.tar.bz2.
+REQUIRE_SSP = True
+
+DOC = '''
+Run Tast tests for EC firmware.
+
+The tests are part of 'group:firmware'. The 'firmware_detachable'
+sub-attribute limits it to detachable tests. Once the test is stable change
+the attribute to one of the others.
+'''
+
+command_args, varslist = tast.split_arguments(args)
+args_dict = utils.args_to_dict(command_args)
+assert 'servo_state:WORKING' in DEPENDENCIES
+servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
+
+def run(machine):
+    job.run_test('tast',
+                 host=hosts.create_host(machine, servo_args=servo_args),
+                 test_exprs=['("group:firmware" && firmware_detachable)'],
+                 ignore_test_failures=True,
+                 max_run_sec=16200, # 4h30m
+                 command_args=command_args,
+                 varslist=varslist,
+                 ephemeraldevserver='false',
+                 )
+
+parallel_simple(run, machines)
diff --git a/site_utils/attribute_allowlist.txt b/site_utils/attribute_allowlist.txt
index 75f3de5..aa17a16 100644
--- a/site_utils/attribute_allowlist.txt
+++ b/site_utils/attribute_allowlist.txt
@@ -195,6 +195,7 @@
 suite:faft_cr50_prepvt
 suite:faft_cr50_pvt
 suite:faft_cr50_tot
+suite:faft_detachable
 suite:faft_dev
 suite:faft_ec
 suite:faft_ec_fw_qual
diff --git a/test_suites/control.faft_detachable b/test_suites/control.faft_detachable
new file mode 100644
index 0000000..592b606
--- /dev/null
+++ b/test_suites/control.faft_detachable
@@ -0,0 +1,47 @@
+# Copyright 2022 The ChromiumOS Authors.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+AUTHOR = "ChromeOS Team"
+NAME = "faft_detachable"
+PURPOSE = "New experimental tests for detachables."
+
+TIME = "SHORT"
+TEST_CATEGORY = "General"
+TEST_CLASS = "suite"
+TEST_TYPE = "Server"
+
+DOC = """
+All tests in this suite should also be in faft_unstable. The purpose of this
+suite is to allow a small set of tests to be scheduled into the DUT_QUOTA_POOL.
+
+@param build: The name of the image to test.
+              Ex: x86-mario-release/R17-1412.33.0-a1-b29
+@param board: The board to test on.  Ex: x86-mario
+@param pool: The pool of machines to utilize for scheduling. If pool=None
+             board is used.
+@param check_hosts: require appropriate live hosts to exist in the lab.
+@param SKIP_IMAGE: (optional) If present and True, don't re-image devices.
+"""
+
+import common
+from autotest_lib.server.cros.dynamic_suite import dynamic_suite
+
+# Values specified in this bug template will override default values when
+# filing bugs on tests that are a part of this suite. If left unspecified
+# the bug filer will fallback to it's defaults.
+_BUG_TEMPLATE = {
+    'labels': ['FW-labblocker', 'Restrict-View-Google'],
+    'owner': '',
+    'status': None,
+    'summary': None,
+    'title': None,
+}
+
+args_dict['file_bugs'] = False
+args_dict['name'] = 'faft_detachable'
+args_dict['job'] = job
+args_dict['add_experimental'] = True
+args_dict['bug_template'] = _BUG_TEMPLATE
+
+dynamic_suite.reimage_and_run(**args_dict)