/test/testfwk/xdevice/plugins/ohos/src/ohos/managers/ |
D | manager_lite.py | 62 for device in devices: 65 device_lite_instance.__init_device__(device) 86 for device in self.devices_list: 87 if device_option.matches(device): 88 device.device_allocation_state = \ 91 convert_serial(device.__get_serial__()), 92 device.__class__)) 93 return device 100 def release_device(self, device): argument 104 if device.device_allocation_state == \ [all …]
|
D | manager_device.py | 52 @Plugin(type=Plugin.MANAGER, id=ManagerType.device) 78 device = UserConfigManager( 81 if device: 83 self.device_connector = DeviceConnector(device.get("ip"), 84 device.get("port"), 85 device.get("usb_type")) 88 device.get("sn")) 95 device.get("usb_type"), error)) 97 device.get("ip"), device.get("port"), 115 for device in self.devices_list: [all …]
|
/test/testfwk/xdevice/src/xdevice/_core/environment/ |
D | manager_env.py | 57 for device in self.devices: 58 device_serials.append(convert_serial(device.__get_serial__())) 72 def add_device(self, device, index=None): argument 73 label = self.device_mapper.get(device.label, "DUT") 78 device.device_id = "%s%s" % (label, current) 79 LOG.debug("add_device, sn: {}, id: {}".format(device.device_sn, device.device_id)) 81 self.devices.append(device) 141 device = self.apply_device(device_option) 142 if device is not None: 143 index = self.get_config_device_index(device) [all …]
|
D | device_monitor.py | 48 def __init__(self, device): argument 50 self.device_state = device.test_device_state 51 self.device = device 59 self.device.log.debug( 60 "wait device %s for %s" % (convert_serial(self.device.device_sn), 84 self.device.log.debug("wait for boot complete, and wait time: %s ms" % 88 result = self.device.get_recover_result(retry=0) 89 if self.device.check_recover_result(result): 93 self.device.log.error("wait for boot complete exception: %s"
|
D | env_pool.py | 108 device = self._apply_device(selector, timeout) 109 if device is not None: 111 convert_serial(device.device_sn), device.extend_value)) 112 self.devices.append(device) 116 return device 136 for device in self.devices: 137 if hasattr(device, "remove_ports"): 138 device.remove_ports() 165 device = manager.apply_device(device_option, timeout) 166 if hasattr(device, "env_index"): [all …]
|
/test/testfwk/developer_test/src/core/command/ |
D | distribute_utils.py | 46 for device in list(env_manager.managers.values())[0].devices_list: 47 get_device_info(device, file_handle) 49 for device in list(env_manager.managers.values())[1].devices_list: 50 get_device_info(device, file_handle) 53 def get_device_info(device, file_handle): argument 60 if device.test_device_state.value == "ONLINE": 61 status = device.label if device.label else 'None' 62 LOG.info("%s,%s" % (device.device_sn, status)) 64 device.device_sn, 65 device.label if device.label else 'None', [all …]
|
/test/testfwk/developer_test/aw/python/distributed/common/ |
D | manager.py | 37 device = DeviceShell(self.is_hdc, device_sn=device_info_list[0], 41 return device 51 device = self.make_device_adapter(item, device_name) 52 self.phone_device_list.append(device) 53 setattr(self, device.name, device) 57 device = self.make_device_adapter(item, device_name) 58 self.ivi_device_list.append(device) 59 setattr(self, device.name, device) 63 device = self.make_device_adapter(item, device_name) 64 self.tv_device_list.append(device) [all …]
|
D | drivers.py | 62 def is_exist_target_in_device(device, path, target): argument 65 stdout_info = device.shell_with_output(command) 71 def receive_coverage_data(device, result_path, suite_file, file_name): argument 80 file_name + '_' + file_dir + '_' + device.device_sn)) 82 if is_exist_target_in_device(device, DEVICE_TEST_PATH, "obj"): 85 device.shell( 88 device.pull_file(src_file_tar, cxx_cov_path) 117 def __init__(self, device, hdc_tools): argument 118 self.device = device 149 self.device.push_file(file_path, DEVICE_TEST_PATH) [all …]
|
/test/testfwk/xdevice/plugins/ohos/src/ohos/testkit/ |
D | kit_lite.py | 79 def _reset(self, device): argument 80 cmd_com = device.device.com_dict.get(ComType.cmd_com) 87 device.device_allocation_state = DeviceAllocationState.unusable 100 def _send_file(self, device): argument 105 deploy_serial_port = device.device.com_dict.get( 107 deploy_baudrate = device.device.com_dict.\ 126 device.device_allocation_state = DeviceAllocationState.unusable 130 def __setup__(self, device, **kwargs): argument 139 self._reset(device) 140 self._send_file(device) [all …]
|
D | kit.py | 80 def __setup__(self, device, **kwargs): argument 83 format(device, self.get_plugin_config().__dict__)) 88 self._run_command(command, device) 90 def __teardown__(self, device): argument 92 (device, self.get_plugin_config().__dict__)) 97 self._run_command(command, device) 99 def _run_command(self, command, device): argument 105 device.reboot() 114 result = device.install_package(package) 118 (package, device.__get_serial__(), result)) [all …]
|
/test/testfwk/developer_test/aw/python/distributed/distribute/ |
D | distribute.py | 67 def get_current_driver(device, target_name, hdc_tools): argument 71 driver = CppTestDriver(device, hdc_tools) 73 driver = CppTestDriver(device, hdc_tools) 88 def exec_agent(self, device, target_name, result_path, options): argument 89 driver = get_current_driver(device, target_name, self.hdc_tools) 94 resource_dir = get_resource_dir(self.suite_dir, device.name) 96 self._make_agent_desc_file(device) 97 device.push_file(os.path.join(self.suite_dir, "agent.desc"), 98 device.test_path) 99 device.push_file(os.path.join(resource_dir, target_name), [all …]
|
/test/testfwk/xdevice/src/xdevice/_core/testkit/ |
D | kit.py | 45 def remount(device): argument 46 device.enable_hdc_root() 48 if device.usb_type == DeviceConnectorType.hdc else "remount" 49 device.connector_command(cmd) 50 device.execute_shell_command("remount") 51 device.execute_shell_command("mount -o rw,remount /cust") 52 device.execute_shell_command("mount -o rw,remount /product") 53 device.execute_shell_command("mount -o rw,remount /hw_product") 54 device.execute_shell_command("mount -o rw,remount /version") 55 device.execute_shell_command("mount -o rw,remount /%s" % "system") [all …]
|
/test/testfwk/xdevice/plugins/ohos/src/ohos/environment/ |
D | device_lite.py | 126 self.device = None 144 def __set_serial__(self, device=None): argument 145 for item in device: 178 def _check_watchgt(device): argument 179 for item in device: 199 def _check_wifiiot_config(device): argument 201 for item in device: 222 def _check_ipcamera_local(device): argument 223 for item in device: 232 def _check_ipcamera_remote(device=None): argument [all …]
|
D | dmlib.py | 226 device = get_plugin(plugin_type=Plugin.DEVICE, plugin_id=os_type)[0] 227 device_instance = device.__class__() 387 def __init__(self, device, host=None, port=None): argument 388 self.device = device 403 HdcHelper.set_device(self.device, self.sock) 410 self.device.log.error( 434 self.device.log.debug("Remote file %s mode is %d" % (remote, mode)) 449 HdcHelper.execute_shell_command(self.device, "ls %s" % remote, 456 self.device.log.info("skipping special file '%s'" % remote) 467 self.device.log.info( [all …]
|
/test/testfwk/developer_test/src/core/testkit/ |
D | kit_lite.py | 66 def _reset(self, device): argument 67 cmd_com = device.device.com_dict.get(ComType.cmd_com) 73 device.device_allocation_state = DeviceAllocationState.unusable 86 def _send_file(self, device, source_file): argument 91 deploy_serial_port = device.device.com_dict.get( 93 deploy_baudrate = device.device.com_dict.\ 112 device.device_allocation_state = DeviceAllocationState.unusable 116 def __setup__(self, device, **kwargs): argument 126 self._reset(device) 127 self._send_file(device, source_file) [all …]
|
/test/xts/hats/ai/nnrt/hdi/v1_0/nnrtStabilityTest/src/ |
D | hdi_stability_test.cpp | 50 void PrepareModelTest(OHOS::sptr<V1_0::INnrtDevice> device, V1_0::Model *iModel) in PrepareModelTest() argument 54 EXPECT_EQ(HDF_SUCCESS, device->PrepareModel(*iModel, config, iPreparedModel)); in PrepareModelTest() 57 void RunModelTest(OHOS::sptr<V1_0::INnrtDevice> device, OHOS::sptr<V1_0::IPreparedModel> iPreparedM… in RunModelTest() argument 70 auto tensor = HDICommon::CreateIOTensor(device); in RunModelTest() 78 auto outputTensor = HDICommon::CreateIOTensor(device); in RunModelTest() 94 HDICommon::ReleaseBufferOfTensors(device, inputs); in RunModelTest() 95 HDICommon::ReleaseBufferOfTensors(device, outputs); in RunModelTest() 112 OHOS::sptr<V1_0::INnrtDevice> device = V1_0::INnrtDevice::Get(); variable 122 auto retConvert = HDICommon::ConvertModel(device, model, tensorBuffer, &iModel); 134 threads.emplace_back(std::thread(PrepareModelTest, device, iModel)); [all …]
|
/test/xts/acts/usb/usb_standard/src/main/js/test/ |
D | UsbCoreJsunitEx.test.js | 96 var device = JSON.parse(JSON.stringify(gDeviceList[0])); 97 device.devAddress = 2 + 10000 99 var usbDevicePipe = usbManager.connectDevice(device) 105 ' devAddress ' + device.devAddress); 138 var device = JSON.parse(JSON.stringify(gDeviceList[0])); 139 device.busNum = 2 + 1000 141 var usbDevicePipe = usbManager.connectDevice(device) 147 ' busNum ' + device.busNum); 179 var device = JSON.parse(JSON.stringify(gDeviceList[0])); 180 device.serial = 'asdfsd' [all …]
|
/test/testfwk/developer_test/src/core/driver/ |
D | drivers.py | 220 def _unlock_screen(device): argument 221 device.execute_shell_command("svc power stayon true") 225 def _unlock_device(device): argument 226 device.execute_shell_command("input keyevent 82") 228 device.execute_shell_command("wm dismiss-keyguard") 232 def _lock_screen(device): argument 233 device.execute_shell_command("svc power stayon false") 237 def disable_keyguard(device): argument 238 _unlock_screen(device) 239 _unlock_device(device) [all …]
|
/test/xts/hats/ai/nnrt/hdi/v2_0/nnrtStabilityTest/src/ |
D | hdi_stability_test.cpp | 50 void PrepareModelTest(OHOS::sptr<V2_0::INnrtDevice> device, V2_0::Model *iModel) in PrepareModelTest() argument 54 …EXPECT_EQ(V2_0::NNRT_ReturnCode::NNRT_SUCCESS, device->PrepareModel(*iModel, config, iPreparedMode… in PrepareModelTest() 57 void RunModelTest(OHOS::sptr<V2_0::INnrtDevice> device, OHOS::sptr<V2_0::IPreparedModel> iPreparedM… in RunModelTest() argument 70 auto tensor = HDICommon::CreateIOTensor(device); in RunModelTest() 78 auto outputTensor = HDICommon::CreateIOTensor(device); in RunModelTest() 94 HDICommon::ReleaseBufferOfTensors(device, inputs); in RunModelTest() 95 HDICommon::ReleaseBufferOfTensors(device, outputs); in RunModelTest() 112 OHOS::sptr<V2_0::INnrtDevice> device = V2_0::INnrtDevice::Get(); variable 123 auto retConvert = HDICommon::ConvertModel(device, model, tensorBuffer, &iModel); 135 threads.emplace_back(std::thread(PrepareModelTest, device, iModel)); [all …]
|
/test/xts/acts/developtools/hiplugintest/ |
D | BUILD.gn | 16 import("../../../../../developtools/profiler/device/base/config.gni") 25 "${OHOS_PROFILER_DIR}/device/plugins/memory_plugin:memdataplugin", 31 "${OHOS_PROFILER_DIR}/device/plugins/memory_plugin/include", 32 "${OHOS_PROFILER_DIR}/device/plugins/api/include", 33 "${OHOS_PROFILER_DIR}/device/plugins/api/src", 34 "${OHOS_PROFILER_DIR}/device/base/include/", 38 "${OHOS_PROFILER_DIR}/device/plugins/memory_plugin/test/unittest/buffer_splitter_unittest.cpp", 39 … "${OHOS_PROFILER_DIR}/device/plugins/memory_plugin/test/unittest/memory_data_plugin_unittest.cpp",
|
/test/xts/hats/hdf/external_device_manager/device_manager_test/ |
D | device_manager_test.cpp | 54 for (auto &[_, device] : map) { in getDeviceNum() 55 if (!device->IsUnRegisted()) { in getDeviceNum() 83 std::shared_ptr<DeviceInfo> device = std::make_shared<DeviceInfo>(0); variable 84 device->devInfo_.devBusInfo.busType = BusType::BUS_TYPE_TEST; 85 device->devInfo_.devBusInfo.busDeviceId = 1; 86 int32_t ret = callback->OnDeviceAdd(device); 89 ret = callback->OnDeviceRemove(device); 100 std::shared_ptr<DeviceInfo> device = std::make_shared<DeviceInfo>(0); variable 101 device->devInfo_.devBusInfo.busType = BusType::BUS_TYPE_TEST; 102 device->devInfo_.devBusInfo.busDeviceId = 1; [all …]
|
/test/testfwk/xdevice/plugins/ohos/src/ohos/drivers/ |
D | drivers.py | 147 def __init__(self, testsuit_path, result_rootpath, device, argument 151 self.device = device 180 if self.device.is_file_exist(os.path.join(self.device_testpath, 183 elif self.device.is_file_exist(os.path.join(self.device_testpath, 188 self.device.pull_file( 200 if self.device.is_file_exist(remote_result_file): 201 self.device.pull_file(remote_result_file, result_savepath) 210 stdout_info = self.device.execute_shell_command(command) 224 self.device.pull_file( 236 self.device.pull_file(src_file, cxx_cov_path) [all …]
|
D | drivers_lite.py | 144 self.config.device = request.config.environment.devices[0] 160 kit.__setup__(request.config.device, request=request) 192 if self.config.device.get("device_kernel") == \ 199 self.config.device.execute_command_with_timeout( 242 if self.config.device.get("device_kernel") == \ 244 self.config.device.execute_command_with_timeout( 247 self.config.device.execute_command_with_timeout( 250 kit.__teardown__(request.config.device) 251 self.config.device.close() 272 result, _, _ = self.config.device.execute_command_with_timeout( [all …]
|
/test/testfwk/xdevice/src/xdevice/_core/config/ |
D | resource_manager.py | 100 def process_resource_file(resource_dir, preparer_list, device): argument 113 device.execute_shell_command("mkdir -p %s" % dst) 114 device.push_file(src, dst) 123 device.pull_file(src, dst) 126 device.execute_shell_command(command) 130 device.execute_command(command) 154 def process_preparer_data(self, data_dic, resource_dir, device): argument 158 self.process_resource_file(resource_dir, preparer_list, device) 161 def process_cleaner_data(self, data_dic, resource_dir, device): argument 165 self.process_resource_file(resource_dir, cleaner_list, device)
|
/test/testfwk/xdevice/ |
D | README_zh.md | 74 以下列出三种device配置。 79 <device type="usb-hdc"> <!-- type: 设备连接方式,usb-hdc表示使用hdc命令控制设备(默认) --> 83 </device> 86 … <device type="com" label="wifiiot"> <!-- type: 设备连接方式,com表示连接方式为串口;label:设备种类,如wifiiot --> 100 </device> 103 <device type="com" label="ipcamera"> 112 </device> 113 <device type="com" label="ipcamera"> 116 </device> 185 "type":"device", [all …]
|