def test_CheckVintf_sku_incompat(self):
   msg = 'vintf/sku_compat should be compatible because ' \
         'ODM/etc/vintf/manifest_sku.xml does not have the required HALs'
   test_dir = self.prepare_test_dir('vintf/sku_incompat')
   write_string_to_file('vintf_odm_manifest_skus=sku',
                        os.path.join(test_dir, 'META/misc_info.txt'), mode='a')
   self.assertFalse(CheckVintf(test_dir), msg=msg)
 def test_CheckVintf_kernel_compat(self):
   msg = 'vintf/kernel with 4.14.1 kernel version should be compatible'
   test_dir = self.prepare_test_dir('vintf/kernel')
   write_string_to_file('', os.path.join(test_dir, 'META/kernel_configs.txt'))
   write_string_to_file('4.14.1',
                        os.path.join(test_dir, 'META/kernel_version.txt'))
   self.assertTrue(CheckVintf(test_dir), msg=msg)
 def test_CheckVintf_kernel_incompat(self):
   msg = 'vintf/kernel with 4.14.0 kernel version should be incompatible ' \
         'because 4.14.1 kernel version is required'
   test_dir = self.prepare_test_dir('vintf/kernel')
   write_string_to_file('', os.path.join(test_dir, 'META/kernel_configs.txt'))
   write_string_to_file('4.14.0',
                        os.path.join(test_dir, 'META/kernel_version.txt'))
   self.assertFalse(CheckVintf(test_dir), msg=msg)
예제 #4
0
 def test_CheckVintf_matrix_incompat(self):
     msg = 'vintf/matrix_incompat should be incompatible because sepolicy ' \
           'version fails to match'
     test_dir = self.prepare_test_dir('vintf/matrix_incompat')
     self.assertFalse(CheckVintf(test_dir), msg=msg)
예제 #5
0
 def test_CheckVintf_sanity(self):
     msg = 'Sanity check with skeleton target files failed.'
     test_dir = self.prepare_test_dir('does-not-exist')
     self.assertTrue(CheckVintf(test_dir), msg=msg)