copy了课件里的工程后,CTS运行不起来

jike_3982942 Android UiAutom... 最后由 jike_6897889 于2017年03月30日回复

  • 2 回答
  • 5.5k 浏览

Using commandline arguments as starting command: [run, cts, --plan, testdemo1TestPlan, --skip-preconditions, -s, AASK6HS8VKUCEYOV]

10-17 14:58:10 I/DeviceManager: Detected new device AASK6HS8VKUCEYOV

10-17 14:58:11 I/TestInvocation: Starting invocation for 'cts' on build '3102289' on device AASK6HS8VKUCEYOV

10-17 14:58:11 I/AASK6HS8VKUCEYOV: Created result dir 2016.10.17_14.58.11

10-17 14:58:11 I/CtsTest: ABIs: [armeabi-v7a, arm64-v8a]

10-17 14:58:15 E/CtsTest: Could not find test id arm64-v8a null referenced in plan testdemo1TestPlan

10-17 14:58:15 E/CtsTest: Could not find test id armeabi-v7a null referenced in plan testdemo1TestPlan

10-17 14:58:15 E/CtsTest: Could not find test id mips null referenced in plan testdemo1TestPlan

10-17 14:58:15 E/CtsTest: Could not find test id mips64 null referenced in plan testdemo1TestPlan

10-17 14:58:15 E/CtsTest: Could not find test id x86 null referenced in plan testdemo1TestPlan

10-17 14:58:15 E/CtsTest: Could not find test id x86_64 null referenced in plan testdemo1TestPlan

10-17 14:58:18 I/AASK6HS8VKUCEYOV: Collecting device info

10-17 14:58:23 I/AASK6HS8VKUCEYOV: Collecting extended device info

10-17 14:58:24 E/DeviceInfoCollector: Cannot run program "/bin/bash": CreateProcess error=2, ϵͳ�Ҳ���ָ�����ļ���

java.io.IOException: Cannot run program "/bin/bash": CreateProcess error=2, ϵͳ�Ҳ���ָ�����ļ���

    at java.lang.ProcessBuilder.start(Unknown Source)

    at java.lang.Runtime.exec(Unknown Source)

    at java.lang.Runtime.exec(Unknown Source)

    at com.android.cts.tradefed.device.DeviceInfoCollector.execute(DeviceInfoCollector.java:148)

    at com.android.cts.tradefed.device.DeviceInfoCollector.pullExtendedDeviceInfoResults(DeviceInfoCollector.java:141)

    at com.android.cts.tradefed.device.DeviceInfoCollector.collectExtendedDeviceInfo(DeviceInfoCollector.java:95)

    at com.android.cts.tradefed.testtype.CtsTest.collectDeviceInfo(CtsTest.java:1079)

    at com.android.cts.tradefed.testtype.CtsTest.run(CtsTest.java:526)

    at com.android.tradefed.invoker.TestInvocation.runTests(TestInvocation.java:734)

    at com.android.tradefed.invoker.TestInvocation.prepareAndRun(TestInvocation.java:549)

    at com.android.tradefed.invoker.TestInvocation.performInvocation(TestInvocation.java:452)

    at com.android.tradefed.invoker.TestInvocation.invoke(TestInvocation.java:232)

    at com.android.tradefed.command.CommandScheduler$InvocationThread.run(CommandScheduler.java:449)

Caused by: java.io.IOException: CreateProcess error=2, ϵͳ�Ҳ���ָ�����ļ���

    at java.lang.ProcessImpl.create(Native Method)

    at java.lang.ProcessImpl.<init>(Unknown Source)

    at java.lang.ProcessImpl.start(Unknown Source)

    ... 13 more

10-17 14:58:24 E/DeviceInfoCollector: Failed to run adb -s AASK6HS8VKUCEYOV pull /sdcard/device-info-files C:Program Files (x86)Androidandroid-sdkandroid-ctsrepositoryresults2016.10.17_14.58.11device-info-files

10-17 14:58:24 I/CtsTest: Start test run of 0 packages, containing 0 tests

10-17 14:58:25 I/AASK6HS8VKUCEYOV: Saved log device_logcat_9191187940088605299.zip

10-17 14:58:25 I/AASK6HS8VKUCEYOV: Saved log host_log_8000311642794026788.zip

10-17 14:58:25 I/AASK6HS8VKUCEYOV: Created xml report file at file://C:Program Files (x86)Androidandroid-sdkandroid-ctsrepositoryresults2016.10.17_14.58.11testResult.xml

10-17 14:58:25 I/AASK6HS8VKUCEYOV: XML test result file generated at 2016.10.17_14.58.11. Passed 0, Failed 0, Not Executed 0

10-17 14:58:25 I/AASK6HS8VKUCEYOV: Time: 13s

Saved log to C:UsersdonffAppDataLocalTemptradefed_global_log_3145058505934768692.txt

10-17 14:58:25 I/CommandScheduler: All done

我用的6.0的CTS包,老师提示有东西不存在

  • 极客学院_吕布 2016年10月17日 回答 #1楼
  • IOException是 Input Output 异常,也就是输入输出异常,你打一下断点,看看异常信息是出现在哪一行的,其实Console中的异常信息就可以让你定位到你的错误,静下心,打个断点监控一下变量值,看是不是读取文件或者写文件的路径错了, 是不是路径字符忘记转义了。

  • 0 评论
  • jike_6897889 2017年03月30日 回答 #2楼
  • 老师,我的测试用例在android7.0以下都能运行起来,但是在android7.0以上测试用例就出现执行不了,一直处于重启过程中。请问这是什么原因?

  • 0 评论