def setUp(self): """ @fn setUp @param self @return """ self.bt1 = bluetooth.BTFunction(self.targets[0]) self.bt2 = bluetooth.BTFunction(self.targets[1]) self.bt1.target_hciconfig_init() self.bt2.target_hciconfig_init()
def setUpClass(cls): '''Copy gatttool to /tmp/ folder @fn setUpClass @param cls @return ''' bt1 = bluetooth.BTFunction(cls.tc.targets[0]) bt2 = bluetooth.BTFunction(cls.tc.targets[1]) copy_to_path = os.path.join(get_files_dir(), 'gatttool') cls.tc.targets[0].copy_to(copy_to_path, "/tmp/") bt1.target.run('chmod +x /tmp/gatttool') bt2.target.run('chmod +x /tmp/gatttool')
def setUp(self): ''' initialize bluetooth class @fn setUp @param self @return ''' self.bt = bluetooth.BTFunction(self.target)
def setUp(self): """ @fn setUp @param self @return """ self.bt = bluetooth.BTFunction(self.target) self.bt.target_hciconfig_init()
def setUp(self): """ @fn setUp @param self @return """ self.bt = bluetooth.BTFunction(self.target) self.bt.target_hciconfig_init() self.bt.host_hciconfig_init() (status, output) = self.target.run('which gatttool') if (status != 0): copy_to_path = os.path.join(get_files_dir(), 'gatttool') (status, output) = self.target.copy_to(copy_to_path, "/usr/bin/")