示例#1
0
 def test_get_subconfig_input_2depth(self):
     ek = kunit_kernel.ExtKunitconfigGenerator(['kunit.test2'], path=self.test_path)
     result = ek.get_sub_config('kunit.test2')
     tobe = [
             os.path.join(self.test_path, 'kunitconfigs/kunitconfig.kunit.test2'),
             os.path.join(self.test_path, 'kunitconfigs/kunitconfig.kunit.test2.child1')
             ]
     self.assertCountEqual(result, tobe)
示例#2
0
 def test_get_subconfig_childs(self):
     ek = kunit_kernel.ExtKunitconfigGenerator(['muic'], path=self.test_path)
     result = ek.get_sub_config('muic')
     tobe = [
             os.path.join(self.test_path, 'kunitconfigs/kunitconfig.muic'),
             os.path.join(self.test_path, 'kunitconfigs/kunitconfig.muic.i2c'),
             os.path.join(self.test_path, 'kunitconfigs/kunitconfig.muic.max77705')
             ]
     self.assertCountEqual(result, tobe)
示例#3
0
 def test_get_merge_config_triple(self):
     ek = kunit_kernel.ExtKunitconfigGenerator(['kunit.test1', 'sensorhub', 'muic.i2c'], path=self.test_path)
     with open(ek.final_config_file, 'r') as fp:
         result = fp.read()
     tobe = str('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST1=y\nCONFIG_SENSORHUB=y\nCONFIG_I2C=y\n')
     self.assertEqual(result, tobe)
示例#4
0
 def test_get_merge_config_single(self):
     ek = kunit_kernel.ExtKunitconfigGenerator(['muic'], path=self.test_path)
     with open(ek.final_config_file, 'r') as fp:
         result = fp.read()
     tobe = str('CONFIG_KUNIT=y\n# for MUIC MAX77705_UML_TEST\nCONFIG_USE_MUIC=y\nCONFIG_MAX77705_MUIC_TEST=y\nCONFIG_I2C=y\n')
     self.assertEqual(result, tobe)