我正在尝试在Ubuntu上使用python和monkeyrunner自动化完整的CTS设置和执行,并且大部分进展顺利。作为最后一步,我尝试执行以下python命令以在特定设备上启动CTS:cts_tradefed_script = "./android-cts/tools/cts-tradefed"process = subprocess.Popen([cts_tradefed_script, "run", "cts", "-s", '"' + serialno + '"', "--plan", "CTS"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)这等效于:./android-cts/tools/cts-tradefed run cts -s "R32CB054TSZ" --plan CTS在命令行中,我得到:Android CTS 4.2_r4No commands for non-interactive mode; exiting.06-17 17:32:32 I/: Detected new device R32CB054TSZSaved log to /tmp/tradefed_global_log_9173619073367947049.txt06-17 17:32:32 I/CommandScheduler: All doneCTS测试不会执行。是否有我忘记的命令,或者使用Python无法做到?
2 回答

慕尼黑5688855
TA贡献1848条经验 获得超2个赞
cts_tradefed_script = "./android-cts/tools/cts-tradefed"
process = subprocess.Popen([cts_tradefed_script + " " + serialno], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
脚本是没有必要的。只需输入所有内容作为串联字符串即可。
添加回答
举报
0/150
提交
取消