cheets_CTS_P: Do not generate DynamicConfig suppression for moblab.
For now moblab is not affected by the issue. For them let's keep
the normal behavior.
BUG=b:149889853
TEST=generate_control_file_CTS_P does not change the current files.
Change-Id: I80fc41aa7560832baa9040710a4cba77ecfbf803
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2084693
Tested-by: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
Commit-Queue: Shao-Chuan Lee <shaochuan@chromium.org>
Reviewed-by: Shao-Chuan Lee <shaochuan@chromium.org>
diff --git a/server/cros/tradefed/generate_controlfiles_common.py b/server/cros/tradefed/generate_controlfiles_common.py
index f447201..f517bac 100755
--- a/server/cros/tradefed/generate_controlfiles_common.py
+++ b/server/cros/tradefed/generate_controlfiles_common.py
@@ -529,7 +529,7 @@
return CONFIG['AUTHKEY']
-def _format_collect_cmd(retry):
+def _format_collect_cmd(is_public, retry):
"""Returns a list specifying tokens for tradefed to list all tests."""
if retry:
return None
@@ -539,7 +539,8 @@
for m in CONFIG['MEDIA_MODULES']:
cmd.append('--module-arg')
cmd.append('%s:skip-media-download:true' % m)
- if not CONFIG.get('NEEDS_DYNAMIC_CONFIG_ON_COLLECTION', True):
+ if (not is_public and
+ not CONFIG.get('NEEDS_DYNAMIC_CONFIG_ON_COLLECTION', True)):
cmd.append('--dynamic-config-url=')
return cmd
@@ -597,7 +598,7 @@
cmd.append('--skip-device-info')
# If NEEDS_DYNAMIC_CONFIG is set, disable the feature except on the modules
# that explicitly set as needed.
- if (CONFIG.get('NEEDS_DYNAMIC_CONFIG') and
+ if (not is_public and CONFIG.get('NEEDS_DYNAMIC_CONFIG') and
not modules.intersection(CONFIG['NEEDS_DYNAMIC_CONFIG'])):
cmd.append('--dynamic-config-url=')
@@ -609,7 +610,7 @@
cmd = None
if modules.intersection(get_collect_modules(is_public)):
if _COLLECT in modules or _PUBLIC_COLLECT in modules:
- cmd = _format_collect_cmd(retry=retry)
+ cmd = _format_collect_cmd(is_public, retry=retry)
elif _ALL in modules:
cmd = _format_modules_cmd(is_public, modules, retry=retry)
else: