def test_is_tag_visible(self): d = TaggedDict() # LL-NDK visible_tags = {'ll_ndk', 'll_ndk_indirect'} self._check_tag_visibility(d, 'll_ndk', visible_tags) self._check_tag_visibility(d, 'll_ndk_indirect', visible_tags) # SP-NDK visible_tags = { 'll_ndk', 'll_ndk_indirect', 'sp_ndk', 'sp_ndk_indirect' } self._check_tag_visibility(d, 'sp_ndk', visible_tags) self._check_tag_visibility(d, 'sp_ndk_indirect', visible_tags) # VNDK-SP visible_tags = { 'll_ndk', 'sp_ndk', 'vndk_sp', 'vndk_sp_indirect', 'vndk_sp_indirect_private', 'fwk_only_rs' } self._check_tag_visibility(d, 'vndk_sp', visible_tags) self._check_tag_visibility(d, 'vndk_sp_indirect', visible_tags) self._check_tag_visibility(d, 'vndk_sp_indirect_private', visible_tags) # VNDK visible_tags = { 'll_ndk', 'sp_ndk', 'vndk_sp', 'vndk_sp_indirect', 'vndk' } self._check_tag_visibility(d, 'vndk', visible_tags) # FWK-ONLY visible_tags = { 'll_ndk', 'll_ndk_indirect', 'sp_ndk', 'sp_ndk_indirect', 'vndk_sp', 'vndk_sp_indirect', 'vndk_sp_indirect_private', 'vndk', 'fwk_only', 'fwk_only_rs', 'sp_hal' } self._check_tag_visibility(d, 'fwk_only', visible_tags) self._check_tag_visibility(d, 'fwk_only_rs', visible_tags) # SP-HAL visible_tags = {'ll_ndk', 'sp_ndk', 'vndk_sp', 'sp_hal', 'sp_hal_dep'} self._check_tag_visibility(d, 'sp_hal', visible_tags) self._check_tag_visibility(d, 'sp_hal_dep', visible_tags) # VND-ONLY visible_tags = { 'll_ndk', 'sp_ndk', 'vndk_sp', 'vndk_sp_indirect', 'vndk', 'sp_hal', 'sp_hal_dep', 'vnd_only' } self._check_tag_visibility(d, 'vnd_only', visible_tags) # Remove self._check_tag_visibility(d, 'remove', set())
def test_is_tag_visible(self): d = TaggedDict() # LL-NDK visible_tags = {'ll_ndk', 'll_ndk_private'} self._check_tag_visibility(d, 'll_ndk', visible_tags) self._check_tag_visibility(d, 'll_ndk_private', visible_tags) # VNDK-SP visible_tags = { 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'system_only_rs' } self._check_tag_visibility(d, 'vndk_sp', visible_tags) self._check_tag_visibility(d, 'vndk_sp_private', visible_tags) # VNDK visible_tags = { 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'vndk', 'vndk_private' } self._check_tag_visibility(d, 'vndk', visible_tags) # SYSTEM-ONLY visible_tags = { 'll_ndk', 'll_ndk_private', 'vndk_sp', 'vndk_sp_private', 'vndk', 'vndk_private', 'system_only', 'system_only_rs', 'sp_hal' } self._check_tag_visibility(d, 'system_only', visible_tags) self._check_tag_visibility(d, 'system_only_rs', visible_tags) # SP-HAL visible_tags = {'ll_ndk', 'vndk_sp', 'sp_hal', 'sp_hal_dep'} self._check_tag_visibility(d, 'sp_hal', visible_tags) self._check_tag_visibility(d, 'sp_hal_dep', visible_tags) # VENDOR-ONLY visible_tags = { 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal', 'sp_hal_dep', 'vendor_only' } self._check_tag_visibility(d, 'vendor_only', visible_tags) # Remove self._check_tag_visibility(d, 'remove', set())
def test_normalize_tag(self): self.assertEqual('ll_ndk', TaggedDict._normalize_tag('ll-ndk')) self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL-NDK')) self.assertEqual('ll_ndk', TaggedDict._normalize_tag('LL_NDK')) with self.assertRaises(ValueError): TaggedDict._normalize_tag('unknown-lib-tag')
def test_is_tag_visible(self): d = TaggedDict() # LL-NDK visible_tags = {'ll_ndk', 'll_ndk_private'} self._check_tag_visibility(d, 'll_ndk', visible_tags) self._check_tag_visibility(d, 'll_ndk_private', visible_tags) # VNDK-SP visible_tags = { 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'system_only_rs', } self._check_tag_visibility(d, 'vndk_sp', visible_tags) self._check_tag_visibility(d, 'vndk_sp_private', visible_tags) # VNDK visible_tags = { 'll_ndk', 'vndk_sp', 'vndk_sp_private', 'vndk', 'vndk_private', } self._check_tag_visibility(d, 'vndk', visible_tags) # SYSTEM-ONLY and SYSTEM_EXT-ONLY visible_tags = { 'll_ndk', 'll_ndk_private', 'vndk_sp', 'vndk_sp_private', 'vndk', 'vndk_private', 'system_only', 'system_only_rs', 'system_ext_only', 'sp_hal' } self._check_tag_visibility(d, 'system_only', visible_tags) self._check_tag_visibility(d, 'system_only_rs', visible_tags) self._check_tag_visibility(d, 'system_ext_only', visible_tags) # SP-HAL visible_tags = {'ll_ndk', 'vndk_sp', 'sp_hal', 'sp_hal_dep'} self._check_tag_visibility(d, 'sp_hal', visible_tags) self._check_tag_visibility(d, 'sp_hal_dep', visible_tags) # VENDOR-ONLY visible_tags = { 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal', 'sp_hal_dep', 'vendor_only', } self._check_tag_visibility(d, 'vendor_only', visible_tags) # PRODUCT-ONLY visible_tags = { 'll_ndk', 'vndk_sp', 'vndk', 'sp_hal', # Remove the following after VNDK-ext can be checked separately. 'sp_hal_dep', 'vendor_only', } self._check_tag_visibility(d, 'vendor_only', visible_tags) # Remove self._check_tag_visibility(d, 'remove', set())