autotest: add quota-metered pool to skylab_suite pool map
Also, fix the run_skylab_suite helptext.
BUG=chromium:912675
TEST=None
Change-Id: I618f28f3811e180a7f5a8fee58d1476b3c0551ef
Reviewed-on: https://chromium-review.googlesource.com/1366337
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/venv/skylab_suite/suite_parser.py b/venv/skylab_suite/suite_parser.py
index 4cf517f..ecc2ad5 100644
--- a/venv/skylab_suite/suite_parser.py
+++ b/venv/skylab_suite/suite_parser.py
@@ -20,7 +20,7 @@
def make_parser():
"""Make ArgumentParser instance for run_suite_skylab.py."""
parser = argparse.ArgumentParser(prog='run_suite_skylab',
- description=__doc__)
+ description="Run a test suite in Skylab.")
# Suite-related parameters.
parser.add_argument('--board', required=True)
@@ -30,10 +30,13 @@
'builds, model and board are synonymous, but board is more '
'accurate in some cases. Only pass this option if your build '
'is a unified build.'))
+ pool_choices = sorted(swarming_lib.SWARMING_DUT_POOL_MAP.keys())
+ pool_choices.append('')
parser.add_argument(
- '--pool', default='suites',
- help=('Specify the pool of DUTs to run this suite. If you want no '
- 'pool, you can specify it with --pool="". USE WITH CARE.'))
+ '--pool', default='suites', choices=pool_choices,
+ help=('Specify the pool of DUTs to run this suite. Default: suites. '
+ 'If you want no pool, you can specify it with --pool="". '
+ 'USE WITH CARE.'))
parser.add_argument(
'--suite_name', required=True,
help='Specify the suite to run.')
diff --git a/venv/skylab_suite/swarming_lib.py b/venv/skylab_suite/swarming_lib.py
index 27b11f8..a17f823 100644
--- a/venv/skylab_suite/swarming_lib.py
+++ b/venv/skylab_suite/swarming_lib.py
@@ -71,11 +71,12 @@
# TODO (xixuan): Use proto library or some future APIs instead of hardcoding.
SWARMING_DUT_POOL_MAP = {
- 'cq': 'DUT_POOL_CQ',
- 'bvt': 'DUT_POOL_BVT',
- 'suites': 'DUT_POOL_SUITES',
- 'cts': 'DUT_POOL_CTS',
'arc-presubmit': 'DUT_POOL_CTS_PERBUILD',
+ 'bvt': 'DUT_POOL_BVT',
+ 'cq': 'DUT_POOL_CQ',
+ 'cts': 'DUT_POOL_CTS',
+ 'quota-metered': 'DUT_POOL_QUOTA_METERED',
+ 'suites': 'DUT_POOL_SUITES',
}
SWARMING_DUT_READY_STATUS = 'ready'