Check ya:force_distbuild and ya:force_sandbox only for LARGE tests
@@ -113,6 +113,7 @@ def validate_test(kw, is_fuzz_test):
invalid_requirements_for_distbuild = [requirement for requirement in requirements.keys() if requirement not in ('ram', 'cpu')]
has_sb_tags = any([tag.startswith('sb:') for tag in tags])
+ if is_fat:
if in_autocheck:
if 'ya:force_distbuild' not in tags and 'ya:force_sandbox' not in tags and not invalid_requirements_for_distbuild and not has_sb_tags:
tags.append('ya:force_distbuild')
@@ -138,10 +139,12 @@ def validate_test(kw, is_fuzz_test):
tags = filter(lambda o: o != "ya:force_distbuild", tags)
tags_changed = True
- if "ya:force_distbuild" in tags:
- if invalid_requirements_for_distbuild:
+ if "ya:force_distbuild" in tags and invalid_requirements_for_distbuild:
errors.append('Invalid requirement for distbuild mode (tag ya:force_distbuild): {}'.format(', '.join(invalid_requirements_for_distbuild)))
has_fatal_error = True
+ else:
+ if 'ya:force_distbuild' in tags or 'ya:force_sandbox' in tags:
+ errors.append('ya:force_distbuild and ya:force_sandbox can be used with LARGE tests only')
if 'ya:privileged' in tags and 'container' not in requirements:
errors.append("Only tests with 'container' requirement can have 'ya:privileged' tag")
