Home
last modified time | relevance | path

Searched refs:device (Results 1 - 25 of 79) sorted by relevance

1234

/test/testfwk/xdevice/plugins/ohos/src/ohos/managers/
H A Dmanager_device.py52 @Plugin(type=Plugin.MANAGER, id=ManagerType.device)
55 Class representing device manager
78 self.support_types = ["device"]
92 devices = ohos_manager.get_devices("environment/device")
96 for device in devices:
98 device.get("ip"), device.get("port"), device.get("usb_type"))
101 ohos_manager.get_sn_list(device.get("sn")))
107 for device i
[all...]
H A Dmanager_lite.py47 Class representing device manager that
65 self.support_types = ["device"]
73 "environment/device")
76 for device in devices:
79 device_lite_instance.__init_device__(device)
94 Request a device for testing that meets certain criteria.
97 LOG.debug("Lite apply device: apply lock")
101 for device in self.devices_list:
102 if device_option.matches(device):
103 device
[all...]
/test/testfwk/xdevice/src/xdevice/_core/environment/
H A Dmanager_env.py60 for device in self.devices:
61 device_serials.append(convert_serial(device.__get_serial__()))
73 LOG.error(f"get device description error: {e}")
81 def add_device(self, device, index=None):
82 label = self.device_mapper.get(device.label, "DUT")
87 device.device_id = "%s%s" % (label, current) if not device.device_id else device.device_id
88 LOG.debug("add_device, sn: {}, id: {}".format(device.device_sn,
89 device
[all...]
H A Ddevice_monitor.py48 def __init__(self, device):
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
[all...]
H A Denv_pool.py112 LOG.info("Get device by selector")
113 device = self._apply_device(selector, timeout)
114 if device is not None:
116 convert_serial(device.device_sn), device.extend_value))
117 self.devices.append(device)
119 LOG.info("Require label is '{}', can't get device".
121 return device
140 # clear device rpc port
141 for device i
[all...]
/test/testfwk/xdevice/plugins/ohos/src/ohos/testkit/
H A Dkit_lite.py78 def _reset(self, device):
79 cmd_com = device.device.com_dict.get(ComType.cmd_com)
86 device.device_allocation_state = DeviceAllocationState.unusable
96 def _send_file(self, device):
101 deploy_serial_port = device.device.com_dict.get(
103 deploy_baudrate = device.device.com_dict. \
120 device
[all...]
H A Dkit.py80 def __setup__(self, device, **kwargs):
82 LOG.debug("CommandKit setup, device:{}, params:{}".
83 format(device, self.get_plugin_config().__dict__))
88 self._run_command(command, device)
90 def __teardown__(self, device):
91 LOG.debug("CommandKit teardown: device:{}, params:{}".format
92 (device, self.get_plugin_config().__dict__))
97 self._run_command(command, device)
99 def _run_command(self, command, device):
105 device
[all...]
/test/testfwk/xdevice/plugins/ohos/src/ohos/
H A Dexception.py111 def __init__(self, error_msg, error_no="", device=None):
113 if device:
114 self.print_info(device)
117 def print_info(device):
118 device.log.info("#############################################"
121 OHOSRpcNotRunningError.develop_mode(device)
122 OHOSRpcNotRunningError.memery_info(device)
123 device.log.info("#############################################"
128 def develop_mode(device):
129 if not device
[all...]
/test/testfwk/developer_test/src/core/command/
H A Ddistribute_utils.py46 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):
56 :param device:
60 if device.test_device_state.value == "ONLINE":
61 status = device.label if device.label else 'None'
62 LOG.info("%s,%s" % (device
[all...]
/test/testfwk/xdevice/src/xdevice/_core/testkit/
H A Dkit.py47 def remount(device):
49 if device.usb_type == DeviceConnectorType.hdc else "remount"
50 device.connector_command(cmd)
51 device.execute_shell_command("remount")
52 device.execute_shell_command("mount -o rw,remount /")
53 device.execute_shell_command("mount -o rw,remount /sys_prod")
54 device.execute_shell_command("mount -o rw,remount /chip_prod")
55 device.execute_shell_command("mount -o rw,remount /preload")
56 device.execute_shell_command("mount -o rw,remount /patch_hw")
57 device
[all...]
/test/testfwk/developer_test/aw/python/distributed/distribute/
H A Ddistribute.py67 def get_current_driver(device, target_name, hdc_tools):
71 driver = CppTestDriver(device, hdc_tools)
73 driver = CppTestDriver(device, hdc_tools)
89 def pull_result(device, source_path, result_save_path):
91 device.pull_file(source_path, result_save_path)
96 def _check_thread(device, thread_name):
102 output = device.shell_with_output(check_command)
111 def _query_device_ip(device):
112 output = device.shell_with_output("getprop ro.hardware")
117 output = device
[all...]
/test/testfwk/developer_test/aw/python/distributed/common/
H A Dmanager.py54 device = DeviceShell(self.is_hdc, device_sn=device_info_list[0],
58 return device
68 device = self.make_device_adapter(item, device_name)
69 self.phone_device_list.append(device)
70 setattr(self, device.name, device)
74 device = self.make_device_adapter(item, device_name)
75 self.ivi_device_list.append(device)
76 setattr(self, device.name, device)
[all...]
H A Ddrivers.py62 def is_exist_target_in_device(device, path, target):
65 stdout_info = device.shell_with_output(command)
71 def receive_coverage_data(device, result_path, suite_file, file_name):
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):
118 self.device = device
[all...]
/test/testfwk/xdevice/plugins/ohos/src/ohos/environment/
H A Ddmlib.py85 This monitor connects to the Device Connector, gets device and
123 LOG.error("HdcMonitor can't find connector, init device "
203 "HdcMonitor Connected to hdc for device "
224 device = get_plugin(plugin_type=Plugin.DEVICE, plugin_id=os_type)[0]
225 device_instance = device.__class__()
231 LOG.debug("Dmlib get device instance {} {} {}, status: {}".format(
234 LOG.debug("Dmlib ignore device instance {} {} {}, status: {}".format(
362 LOG.debug("please check device actually.[%s]" % data_str.strip())
392 def __init__(self, device, host=None, port=None):
393 self.device
[all...]
H A Ddevice_lite.py114 Class representing a device lite device.
116 Each object of this class represents one device lite device in xDevice.
119 device_connect_type: A string that's the type of lite device
129 self.device = None
151 def __set_serial__(self, device=None):
152 for item in device:
185 def _check_watchgt(device):
186 for item in device
[all...]
/test/testfwk/xdevice/plugins/ohos/src/ohos/drivers/
H A Dc_driver_lite.py43 CTest is a test that runs a native test package on given lite device.
77 self.config.device = request.config.environment.devices[0]
182 self.config.device.device.com_dict.get(
184 result, _, error = self.config.device.device. \
190 request.config.device.__get_serial__(),
201 device = self.config.device
202 device
[all...]
H A Dltp_posix_driver.py57 self.config.device = request.config.environment.devices[0]
67 self.config.device.connector_command("shell stop_service hilogd",
69 self.config.device.connector_command("shell start_service hilogd",
73 self.config.device.connector_command("shell hilog -r",
83 self.config.device.device_log_collector.remove_log_address(None, self.hilog)
84 self.config.device.device_log_collector.stop_catch_device_log(self.log_proc)
99 self.config.device.connector_command("target mount")
103 test_list, dsts = kit.__setup__(request.config.device,
107 self.config.device.connector_command(
112 request.config.device
[all...]
H A Djsunit_driver.py40 JSUnitTestDriver is a Test that runs a native test package on given device.
66 device = request.config.environment.devices[0]
67 exe_out = device.execute_shell_command(
72 self.config.device = request.config.environment.devices[0]
97 self.config.device.connector_command(command)
112 LOG.info("prepare to read device log, may wait some time")
154 listener.device_sn = self.config.device.device_sn
286 self.config.device.execute_shell_command(
321 self.config.device.connector_command("shell stop_service hilogd",
323 self.config.device
[all...]
/test/testfwk/developer_test/src/core/testkit/
H A Dkit_lite.py66 def __setup__(self, device, **kwargs):
68 Execute reset command on the device by cmd serial port and then upload
71 device: the instance of LocalController with one or more
76 self._reset(device)
77 self._send_file(device, source_file)
79 def __teardown__(self, device):
99 def _reset(self, device):
100 cmd_com = device.device.com_dict.get(ComType.cmd_com)
106 device
[all...]
/test/testfwk/developer_test/src/core/driver/
H A Ddrivers.py230 def _unlock_screen(device):
231 device.execute_shell_command("svc power stayon true")
235 def _unlock_device(device):
236 device.execute_shell_command("input keyevent 82")
238 device.execute_shell_command("wm dismiss-keyguard")
242 def _lock_screen(device):
243 device.execute_shell_command("svc power stayon false")
247 def disable_keyguard(device):
248 _unlock_screen(device)
249 _unlock_device(device)
[all...]
/test/testfwk/xdevice/src/xdevice/_core/executor/
H A Dconcurrent.py136 # setup device
161 for device in config.environment.devices:
162 device.reboot()
214 for device in self.environment.devices:
215 setattr(device, ConfigConst.common_module_kits, [])
219 for device in self.environment.devices:
222 if not check_device_env_index(device, kit):
224 if check_device_name(device, kit):
227 module_kits = getattr(device, ConfigConst.common_module_kits)
229 kit_copy.__setup__(device, reques
[all...]
/test/xts/hats/ai/nnrt/hdi/v2_0/nnrtStabilityTest/src/
H A Dhdi_stability_test.cpp50 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, iPreparedModel)); in PrepareModelTest()
57 void RunModelTest(OHOS::sptr<V2_0::INnrtDevice> device, OHOS::sptr<V2_0::IPreparedModel> iPreparedModel) 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(); in HWTEST_F() local
123 auto retConvert = HDICommon::ConvertModel(device, model, tensorBuffer, &iModel); in HWTEST_F()
135 threads.emplace_back(std::thread(PrepareModelTest, device, iMode in HWTEST_F()
160 OHOS::sptr<V2_0::INnrtDevice> device = V2_0::INnrtDevice::Get(); HWTEST_F() local
[all...]
/test/xts/hats/ai/nnrt/hdi/v1_0/nnrtStabilityTest/src/
H A Dhdi_stability_test.cpp50 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> iPreparedModel) 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(); in HWTEST_F() local
122 auto retConvert = HDICommon::ConvertModel(device, model, tensorBuffer, &iModel); in HWTEST_F()
134 threads.emplace_back(std::thread(PrepareModelTest, device, iMode in HWTEST_F()
159 OHOS::sptr<V1_0::INnrtDevice> device = V1_0::INnrtDevice::Get(); HWTEST_F() local
[all...]
/test/xts/hats/hdf/external_device_manager/device_manager_test/
H A Ddevice_manager_test.cpp54 for (auto &[_, device] : map) { in getDeviceNum()
55 if (!device->IsUnRegisted()) { in getDeviceNum()
83 std::shared_ptr<DeviceInfo> device = std::make_shared<DeviceInfo>(0); in HWTEST_F() local
84 device->devInfo_.devBusInfo.busType = BusType::BUS_TYPE_TEST; in HWTEST_F()
85 device->devInfo_.devBusInfo.busDeviceId = 1; in HWTEST_F()
86 int32_t ret = callback->OnDeviceAdd(device); in HWTEST_F()
89 ret = callback->OnDeviceRemove(device); in HWTEST_F()
94 // test adding device repeatedly
100 std::shared_ptr<DeviceInfo> device = std::make_shared<DeviceInfo>(0); in HWTEST_F() local
101 device in HWTEST_F()
[all...]
/test/testfwk/xdevice/src/xdevice/_core/
H A Dutils.py339 def modify_props(device, local_prop_file, target_prop_file, new_props):
342 device: the device to modify props
351 device.pull_file(target_prop_file, local_prop_file)
385 device.push_file(local_temp_prop_file.name, target_prop_file)
386 device.execute_shell_command(" ".join(["chmod 644", target_prop_file]))
409 LOG.info("Generate device log file: %s", device_log_file)
566 def check_device_name(device, kit, step="setup"):
568 device_name = device.get("name")
573 LOG.debug("Do kit:%s %s for device
[all...]

Completed in 11 milliseconds

1234