diff --git a/.github/gecko-test/libcubeb-path/moz.yaml b/.github/gecko-test/libcubeb-path/moz.yaml index 96c3040d..9977faed 100644 --- a/.github/gecko-test/libcubeb-path/moz.yaml +++ b/.github/gecko-test/libcubeb-path/moz.yaml @@ -35,3 +35,4 @@ updatebot: - type: vendoring enabled: True blocking: 1234 + options: ["one", "two"] diff --git a/components/libraryprovider.py b/components/libraryprovider.py index 0fdd21ed..656a6b9f 100644 --- a/components/libraryprovider.py +++ b/components/libraryprovider.py @@ -105,6 +105,8 @@ def __init__(self, dict): self.frequency = dict['frequency'] self.platform = dict['platform'] self.blocking = dict['blocking'] + # Each option named in the moz.yaml is stored as a key set to True. + self.options = {option: True for option in dict['options']} if self.type == 'commit-alert': self.filter = dict['filter'] @@ -298,6 +300,7 @@ def validate_task(task_dict, library_name): validated_task['needinfo'] = get_key_or_default('needinfo', task_dict, []) validated_task['frequency'] = get_key_or_default('frequency', task_dict, 'every') validated_task['blocking'] = get_key_or_default('blocking', task_dict, None) + validated_task['options'] = get_key_or_default('options', task_dict, []) if validated_task['platform'] not in ('windows', 'linux'): raise AttributeError('library {0} task has an invalid value for a platform: {1}'.format(library_name, validated_task['platform'])) diff --git a/tests/library.py b/tests/library.py index 8bf24432..ae50ac23 100755 --- a/tests/library.py +++ b/tests/library.py @@ -72,7 +72,8 @@ LibraryProvider.validate_task({ 'type': "vendoring", 'enabled': True, - 'blocking': '1234' + 'blocking': '1234', + 'options': ['one', 'two'] }, "n/a") ], "yaml_path": ".github/gecko-test/libcubeb-path/moz.yaml".replace("/", os.path.sep)