Lines Matching refs:test_descriptor
149 def run(test_descriptor, nodes): argument
174 test_descriptor[node.get_name()+'_oob_confirm'] = confirm
177 test_descriptor[node.get_name()+'_oob_random'] = random
182 master_role = test_descriptor['master_role']
188 master.set_auth_req(test_descriptor[master_role + '_auth_req'])
189 … master.set_io_capabilities(test_descriptor[master_role + '_io_capabilities'])
190 master.set_oob_data(test_descriptor[master_role + '_oob_data'])
192 master.set_failure(test_descriptor['tester_failure'])
211 if test_descriptor['tester_oob_data'] == '1':
213 tester_node.write('o' + test_descriptor['iut_oob_confirm'])
214 tester_node.write('r' + test_descriptor['iut_oob_random'])
215 test_descriptor['method'] = 'OOB'
216 if test_descriptor['iut_oob_data'] == '1':
218 iut_node.write('o' + test_descriptor['tester_oob_confirm'])
219 iut_node.write('r' + test_descriptor['tester_oob_random'])
220 test_descriptor['method'] = 'OOB'
225 test_descriptor['method'] = 'Just Works'
226 if node.get_name() == 'tester' and test_descriptor['tester_failure'] == '12':
234 test_descriptor['method'] = 'Numeric Comparison'
235 if node.get_name() == 'tester' and test_descriptor['tester_failure'] == '12':
244 test_descriptor['passkey'] = passkey
245 if node.get_name() == 'tester' and test_descriptor['tester_failure'] == '1':
251 test_descriptor['waiting_node'].write(test_descriptor['passkey'])
253 test_descriptor['method'] = 'Passkey Entry'
254 if node.get_name() == 'tester' and test_descriptor['tester_failure'] == '1':
258 node.write(test_descriptor['passkey'])
260 test_descriptor['waiting_node'] = node
265 test_descriptor[node.get_name()+'_pairing_complete_status'] = status
266 test_descriptor[node.get_name()+'_pairing_complete_reason'] = reason
277 test_descriptor['error'] = 'DISCONNECTED'
283 def write_config(fout, test_descriptor): argument
302 fout.write('Test: %s\n' % test_descriptor['name'])
319 iut = io_capabilities[int(test_descriptor['iut_io_capabilities' ])]
320 tester = io_capabilities[int(test_descriptor['tester_io_capabilities'])]
322 iut = (int(test_descriptor['iut_auth_req' ]) & SM_AUTHREQ_MITM_PROTECTION) >> 2
323 tester = (int(test_descriptor['tester_auth_req']) & SM_AUTHREQ_MITM_PROTECTION) >> 2
325 iut = (int(test_descriptor['iut_auth_req' ]) & SM_AUTHREQ_SECURE_CONNECTION) >> 3
326 tester = (int(test_descriptor['tester_auth_req']) & SM_AUTHREQ_SECURE_CONNECTION) >> 3
328 iut = (int(test_descriptor['iut_auth_req' ]) & SM_AUTHREQ_KEYPRESS) >> 4
329 tester = (int(test_descriptor['tester_auth_req']) & SM_AUTHREQ_KEYPRESS) >> 4
331 iut = (int(test_descriptor['iut_auth_req' ]) & 192) >> 6
332 tester = (int(test_descriptor['tester_auth_req']) & 192) >> 6
334 if not 'passkey' in test_descriptor:
336 iut = test_descriptor['passkey']
337 tester = test_descriptor['passkey']
339 if not 'method' in test_descriptor:
341 iut = test_descriptor['method']
342 tester = test_descriptor['method']
345 tester = failures[int(test_descriptor['tester_failure'])]
347 iut = test_descriptor['iut_' + attribute]
348 tester = test_descriptor['tester_' + attribute]
351 def run_test(test_descriptor): argument
364 test_name = test_descriptor['name']
367 if '/SLA/' in test_descriptor['name']:
378 test_descriptor['iut_role' ] = iut_role
379 test_descriptor['tester_role'] = tester_role
380 test_descriptor['master_role'] = master_role
381 test_descriptor['slave_role'] = slave_role
388 slave.set_auth_req(test_descriptor[slave_role + '_auth_req'])
389 slave.set_io_capabilities(test_descriptor[slave_role + '_io_capabilities'])
390 slave.set_oob_data(test_descriptor[slave_role + '_oob_data'])
392 slave.set_failure(test_descriptor['tester_failure'])
401 run(test_descriptor, nodes)
402 if 'error' in test_descriptor:
404 raise NameError(test_descriptor['error'])
414 test_folder = test_descriptor['test_folder']
418 if test_descriptor['tester_failure'] != '0':
420 test_ok &= test_descriptor['iut_pairing_complete_status'] != '0'
421 … test_ok &= test_descriptor['iut_pairing_complete_reason'] == test_descriptor['tester_failure']
423 test_ok &= test_descriptor['iut_pairing_complete_status'] == '0'
426 if 'method' in test_descriptor:
427 method = test_descriptor['method']
446 test_descriptor['iut_bd_addr'] = iut.get_bd_addr()
447 test_descriptor['tester_bd_addr'] = tester.get_bd_addr()
448 write_config(fout, test_descriptor)
452 test_descriptor['interrupted'] = 'EXIT'
466 for test_descriptor in reader:
467 test_name = test_descriptor['name']
475 test_descriptor['test_folder'] = test_folder
489 print(test_descriptor)
490 run_test(test_descriptor)
495 if 'interrupted' in test_descriptor:
499 if 'error' in test_descriptor:
500 del test_descriptor['error']
504 if 'interrupted' in test_descriptor: