在 Androidgts-tradefed
或xts-tradefed
中,perl 或 Python 脚本中的“分片”选项不适用于 2 个或更多设备。
Python代码
import subprocess
p = subprocess.Popen('./gts-tradefed run gts --shards 2', stdout=subprocess.PIPE,stderr=subprocess.PIPE,stdin=subprocess.PIPE)
out, err = p.communicate()
print out
命令的输出:
Android GTS 3.0_r5 build:3028956
Non-interactive mode: Running initial command then exiting.
Using commandline arguments as starting command: [run, xts, --plan, XTS, --shards, 2]
08-16 16:07:44 I/DeviceManager: Detected new device 100fb56f
08-16 16:07:44 I/DeviceManager: Detected new device 20bf34cc
08-16 16:07:44 I/unknown_device: Created result dir 2016.08.16_16.07.44
Saved log to /tmp/tradefed_global_log_6249175650313503897.txt
08-16 16:07:45 I/CommandScheduler: All done
如果"run gts --shards 2"
输入命令gts-tradefed
将按预期工作。
请建议如何"./gts-tradefed run gts --shards 2"
从 Python 或 perl 脚本调用和执行它。