Lines Matching full:handler

27     Handler,
124 handler = Handler(mocked_instance)
125 handler.suite_name_check = True
135 handler._final_handle_actions(harness, handler_time)
137 assert handler.instance.status == 'failed'
138 assert handler.instance.execution_time == handler_time
139 assert handler.instance.reason == 'RunID mismatch'
141 testcase in handler.instance.testcases)
143 handler.instance.reason = 'This reason shan\'t be changed.'
144 handler._final_handle_actions(harness, handler_time)
146 assert handler.instance.reason == 'This reason shan\'t be changed.'
172 with mock.patch.object(Handler, '_missing_suite_name') as _missing_mocked:
173 handler = Handler(instance)
174 handler._verify_ztest_suite_name(
190 handler = Handler(mocked_instance)
191 handler.suite_name_check = True
197 handler._missing_suite_name(expected_suite_names, handler_time)
199 assert handler.instance.status == 'failed'
200 assert handler.instance.execution_time == handler_time
201 assert handler.instance.reason == 'Testsuite mismatch'
203 testcase.status == 'failed' for testcase in handler.instance.testcases
211 handler = Handler(instance)
212 handler.suite_name_check = True
229 handler.record(harness)
255 handler = Handler(instance)
271 handler.terminate(mock_proc)
273 assert handler.terminated
284 handler.terminated = False
287 handler.terminate(mock_proc)
301 handler = BinaryHandler(instance, 'build')
302 handler.pid_fn = os.path.join('dummy', 'path', 'to', 'pid.pid')
310 handler.try_kill_process_by_pid()
319 handler.pid_fn = os.path.join('dummy', 'path', 'to', 'pid.pid')
322 handler.try_kill_process_by_pid()
421 handler = BinaryHandler(mocked_instance, 'build')
422 handler.terminate = mock.Mock()
423 handler.options = mock.Mock(timeout_multiplier=1)
432 handler._output_handler(proc, harness)
434 mock_file.assert_called_with(handler.log, 'wt')
446 handler.terminate.assert_called_once_with(proc)
477 handler = BinaryHandler(mocked_instance, 'build')
478 handler.generator_cmd = 'generator'
479 handler.binary = 'bin'
480 handler.call_make_run = call_make_run
481 handler.call_west_flash = call_west_flash
482 handler.options = mock.Mock(enable_valgrind=enable_valgrind)
483 handler.seed = seed
484 handler.extra_test_args = extra_args
485 handler.build_dir = 'build_dir'
487 command = handler._create_command(robot_test)
510 handler = BinaryHandler(mocked_instance, 'build')
511 handler.options = mock.Mock(
524 res = handler._create_env()
565 handler = BinaryHandler(mocked_instance, 'build')
567 handler.terminated = terminated
568 handler.returncode = returncode
569 handler.options = mock.Mock(enable_valgrind=enable_valgrind)
571 handler.instance.add_missing_case_status = missing_mock
573 handler._update_instance_info(harness_state, handler_time)
575 assert handler.instance.execution_time == handler_time
577 assert handler.instance.status == expected_status
578 assert handler.instance.reason == expected_reason
613 handler = BinaryHandler(mocked_instance, 'build')
614 handler.sourcedir = 'source_dir'
615 handler.build_dir = 'build_dir'
616 handler.name= 'Dummy Name'
617 handler._create_command = mock.Mock(return_value=['dummy' , 'command'])
618 handler._create_env = mock.Mock(return_value=[])
619 handler._update_instance_info = mock.Mock()
620 handler._final_handle_actions = mock.Mock()
621 handler.terminate = mock.Mock()
622 handler.try_kill_process_by_pid = mock.Mock()
623 handler.options = mock.Mock(coverage=coverage)
636 handler.handle(harness)
645 handler._update_instance_info.assert_called_once()
646 handler._final_handle_actions.assert_called_once()
678 handler = SimulationHandler(mocked_instance, type_str)
680 assert handler.call_make_run == expected_call_make_run
681 assert handler.ready == expected_ready
684 assert handler.pid_fn == os.path.join(mocked_instance.build_dir,
687 assert handler.pid_fn == os.path.join(mocked_instance.build_dir,
754 handler = DeviceHandler(mocked_instance, 'build')
755 handler.options = mock.Mock(coverage=not end_by_state)
758 handler.monitor_serial(ser, halt_event, harness)
857 handler = DeviceHandler(mocked_instance, 'build')
858 handler.duts = duts
861 device = handler.device_is_available(mocked_instance)
867 device = handler.device_is_available(mocked_instance)
872 device = handler.device_is_available(mocked_instance)
889 handler = DeviceHandler(mocked_instance, 'build')
890 handler.duts = duts
892 handler.make_device_available(serial)
894 assert len([None for d in handler.duts if d.available == 1]) == 2
895 assert handler.duts[2].available == 0
967 def mock_availability(handler, instance, no=num_of_failures): argument
970 if handler.no:
971 handler.no -= 1
975 handler = DeviceHandler(mocked_instance, 'build')
976 handler.no = num_of_failures
983 hardware = handler.get_hardware()
1106 handler = DeviceHandler(mocked_instance, 'build')
1107 handler.options = mock.Mock(west_flash=self_west_flash)
1108 handler.generator_cmd = 'generator_cmd'
1110 expected = [handler.build_dir if val == '$build_dir' else \
1120 command = handler._create_command(runner, hardware)
1147 handler = DeviceHandler(mocked_instance, 'build')
1150 handler.instance.add_missing_case_status = missing_mock
1152 handler._update_instance_info(harness_state, handler_time, flash_error)
1154 assert handler.instance.execution_time == handler_time
1156 assert handler.instance.status == expected_status
1157 assert handler.instance.reason == expected_reason
1206 handler = DeviceHandler(mocked_instance, 'build')
1207 handler.make_device_available = mock.Mock()
1209 handler.instance.add_missing_case_status = missing_mock
1211 handler.make_device_available = available_mock
1212 handler.options = mock.Mock(timeout_multiplier=1)
1221 result = handler._create_serial_connection(serial_device, hardware_baud,
1229 assert handler.instance.status == 'failed'
1230 assert handler.instance.reason == 'Serial Device Error'
1265 handler = DeviceHandler(mocked_instance, 'build')
1275 result = handler._get_serial_device(serial_pty, hardware_serial)
1377 handler = DeviceHandler(mocked_instance, 'build')
1378 handler.get_hardware = mock.Mock(return_value=hardware)
1379 handler.options = mock.Mock(
1384 handler._get_serial_device = mock.Mock(side_effect=mock_get_serial)
1385 handler._create_command = mock.Mock(return_value=['dummy', 'command'])
1386 handler.run_custom_script = mock.Mock()
1387 handler._create_serial_connection = mock.Mock(
1390 handler.monitor_serial = mock.Mock()
1391 handler.terminate = mock.Mock(side_effect=mock_terminate)
1392 handler._update_instance_info = mock.Mock()
1393 handler._final_handle_actions = mock.Mock()
1394 handler.make_device_available = mock.Mock()
1395 handler.instance.platform.name = 'IPName'
1403 handler.handle(harness)
1405 handler.get_hardware.assert_called_once()
1413 handler.run_custom_script.assert_has_calls([
1420 handler.run_custom_script.assert_has_calls([
1427 assert handler.instance.reason == expected_reason
1429 assert handler.instance.status == expected_status
1431 handler.make_device_available.assert_called_once_with(
1454 handler = QEMUHandler(mocked_instance, 'build')
1456 assert handler.ignore_qemu_crash == expected_ignore_crash
1457 assert handler.ignore_unexpected_eof == expected_ignore_unexpected_eof
1509 handler = QEMUHandler(mocked_instance, 'build')
1510 handler.instance.testsuite.sysbuild = self_sysbuild
1511 handler.build_dir = self_build_dir
1514 result = handler._get_sysbuild_build_dir()
1549 handler = QEMUHandler(mocked_instance, 'build')
1550 handler.log = self_log
1551 handler.pid_fn = self_pid_fn
1555 handler._set_qemu_filenames(sysbuild_build_dir)
1557 assert handler.fifo_fn == mocked_instance.build_dir + \
1560 assert handler.pid_fn == sysbuild_build_dir + os.path.sep + 'qemu.pid'
1562 assert handler.log_fn == self_log
1572 handler = QEMUHandler(mocked_instance, 'build')
1573 handler.generator_cmd = 'dummy_cmd'
1575 result = handler._create_command(sysbuild_build_dir)
1655 handler = QEMUHandler(mocked_instance, 'build')
1656 handler.returncode = self_returncode
1657 handler.ignore_qemu_crash = self_ignore_qemu_crash
1659 handler._update_instance_info(harness_state, is_timeout)
1661 assert handler.instance.status == expected_status
1662 assert handler.instance.reason == expected_reason
1790 handler = QEMUHandler(mocked_instance, 'build')
1793 QEMUHandler._thread_update_instance_info(handler, handler_time, out_state)
1795 assert handler.instance.execution_time == handler_time
1797 assert handler.instance.status == expected_status
1798 assert handler.instance.reason == expected_reason
1907 handler = QEMUHandler(mocked_instance, 'build')
1908 handler.results = {}
1909 handler.ignore_unexpected_eof = False
1910 handler.pid_fn = 'pid_fn'
1911 handler.fifo_fn = 'fifo_fn'
1912 handler.options = mock.Mock(timeout_multiplier=1)
1915 if filename == handler.pid_fn:
1917 elif filename == handler.fifo_fn + '.out':
1962 handler,
1963 handler.get_test_timeout(),
1964 handler.build_dir,
1965 handler.log,
1966 handler.fifo_fn,
1967 handler.pid_fn,
1968 handler.results,
1970 handler.ignore_unexpected_eof
1974 handler,
2015 handler = QEMUHandler(mocked_instance, 'build')
2031 handler.fifo_fn = os.path.join('dummy', 'qemu-fifo')
2032 handler.pid_fn = os.path.join(sysbuild_build_dir, 'qemu.pid')
2033 handler.log_fn = os.path.join('dummy', 'log')
2041 handler.options = mock.Mock(
2046 handler.run_custom_script = mock.Mock(return_value=None)
2047 handler.make_device_available = mock.Mock(return_value=None)
2048 handler._final_handle_actions = mock.Mock(return_value=None)
2049 handler._create_command = mock.Mock(return_value=command)
2050 handler._set_qemu_filenames = mock.Mock(side_effect=mock_filenames)
2051 handler._get_sysbuild_build_dir = mock.Mock(return_value=sysbuild_build_dir)
2052 handler.terminate = mock.Mock()
2062 handler.handle(harness)
2068 handler = QEMUHandler(mocked_instance, 'build')
2069 handler.fifo_fn = 'fifo_fn'
2071 result = handler.get_fifo()