def testMakeAclDict(self):
   """Test generation of acls dictionary."""
   acls = cros_mark_android_as_stable.MakeAclDict(self.mock_android_dir)
   self.assertEquals(acls['ARM'], os.path.join(self.mock_android_dir,
                                               'googlestorage_acl_arm.txt'))
   self.assertEquals(acls['X86'], os.path.join(self.mock_android_dir,
                                               'googlestorage_acl_x86.txt'))
   self.assertEquals(acls['X86_INTERNAL'],
                     os.path.join(self.mock_android_dir,
                                  'googlestorage_acl_internal.txt'))
   self.assertEquals(acls['X86_NDK_TRANSLATION'],
                     os.path.join(self.mock_android_dir,
                                  'googlestorage_acl_internal.txt'))
   self.assertEquals(acls['X86_NDK_TRANSLATION_USERDEBUG'],
                     os.path.join(self.mock_android_dir,
                                  'googlestorage_acl_internal.txt'))
   # Test that all MST targets have their ACLs set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_MST_BUILD_BRANCH).keys():
     self.assertTrue(t in acls)
   # Test that all NYC targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_NYC_BUILD_BRANCH).keys():
     self.assertTrue(t in acls)
   # Test that all PI targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_PI_BUILD_BRANCH).keys():
     self.assertTrue(t in acls)
Example #2
0
 def testMakeAclDict(self):
   """Test generation of acls dictionary."""
   acls = cros_mark_android_as_stable.MakeAclDict(self.mock_android_dir)
   self.assertEquals(acls['ARM'], os.path.join(self.mock_android_dir,
                                               'googlestorage_acl_arm.txt'))
   self.assertEquals(acls['X86'], os.path.join(self.mock_android_dir,
                                               'googlestorage_acl_x86.txt'))
Example #3
0
 def testMakeAclDict(self):
   """Test generation of acls dictionary."""
   acls = cros_mark_android_as_stable.MakeAclDict(self.mock_android_dir)
   self.assertEqual(acls['ARM'], os.path.join(self.mock_android_dir,
                                              'googlestorage_acl_arm.txt'))
   self.assertEqual(acls['ARM64'], os.path.join(self.mock_android_dir,
                                                'googlestorage_acl_arm.txt'))
   self.assertEqual(acls['ARM64_USERDEBUG'],
                    os.path.join(self.mock_android_dir,
                                 'googlestorage_acl_arm.txt'))
   self.assertEqual(acls['X86'], os.path.join(self.mock_android_dir,
                                              'googlestorage_acl_x86.txt'))
   self.assertEqual(acls['X86_INTERNAL'],
                    os.path.join(self.mock_android_dir,
                                 'googlestorage_acl_internal.txt'))
   # Test that all MST targets have their ACLs set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_CONTAINER_PACKAGE_KEYWORD,
       constants.ANDROID_MST_BUILD_BRANCH).keys():
     self.assertIn(t, acls)
   # Test that all NYC targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_CONTAINER_PACKAGE_KEYWORD,
       constants.ANDROID_NYC_BUILD_BRANCH).keys():
     self.assertIn(t, acls)
   # Test that all PI targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_CONTAINER_PACKAGE_KEYWORD,
       constants.ANDROID_PI_BUILD_BRANCH).keys():
     self.assertIn(t, acls)
   # Test that all QT targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_CONTAINER_PACKAGE_KEYWORD,
       constants.ANDROID_QT_BUILD_BRANCH).keys():
     self.assertIn(t, acls)
   # Test that all VMPI targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_VM_PACKAGE_KEYWORD,
       constants.ANDROID_VMPI_BUILD_BRANCH).keys():
     self.assertIn(t, acls)
   # Test that all VMMST targets have their ACLS set.
   for t in cros_mark_android_as_stable.MakeBuildTargetDict(
       constants.ANDROID_VM_PACKAGE_KEYWORD,
       constants.ANDROID_VMMST_BUILD_BRANCH).keys():
     self.assertIn(t, acls)