MCPcopy Create free account
hub / github.com/XiaoMi/mace / run_target_origin

Function run_target_origin

tools/python/run_target.py:46–66  ·  view source on GitHub ↗
(target_abi, install_dir, target_obj, device_ids="all")

Source from the content-addressed store, hash-verified

44
45
46def run_target_origin(target_abi, install_dir, target_obj, device_ids="all"):
47 if not install_dir:
48 install_dir = default_install_dir(target_abi)
49
50 run_devices = device.choose_devices(target_abi, device_ids)
51
52 print("Run on devices: %s" % run_devices)
53
54 for device_id in run_devices:
55 # initiate device
56 dev = device.create_device(target_abi, device_id)
57
58 # reinstall target
59 print("Install target from %s to %s" % (target_obj.path, install_dir))
60 device_target = dev.install(target_obj, install_dir, install_deps=True)
61 print(device_target)
62
63 # run on device
64 print("Runing ...")
65 with util.device_lock(device_id):
66 dev.run(device_target)
67
68
69def default_install_dir(target_abi):

Callers 1

run_target.pyFile · 0.85

Calls 3

default_install_dirFunction · 0.85
installMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected