Reputation: 41
I'm trying to run android CTS test.
This is the error that occurs when I run it:
E/TestInvocation: Unexpected contents in directory /tmp/android-cts-media
I copied the media files using the copy_media.sh script, as instructed in http://source.android.com/compatibility/cts/setup.html. Did anybody encounter such error, and knows how to handle?
The complete log is below.
02-21 18:31:51 I/TestInvocation: Invocation was started with cmd: cts -p android.location
02-21 18:31:51 D/BackgroundDeviceAction: Sleep for 5000 before starting logcat for 0123456789012345.
02-21 18:31:51 I/TestInvocation: Starting invocation for 'cts' on build '2566412' on device 0123456789012345
02-21 18:31:51 I/FileSystemLogSaver: Using log file directory /tmp/2566412/cts/inv_3208448448450268121
02-21 18:31:52 I/0123456789012345: Created result dir 2016.02.21_18.31.51
02-21 18:31:52 W/BatteryFetcher: IOException getting battery level for device 0123456789012345: Unrecognized response to battery level queries
02-21 18:31:52 D/RunUtil: run interrupt allowed: true
02-21 18:31:52 D/CtsPreconditionsApp.apk: Uploading CtsPreconditionsApp.apk onto device '0123456789012345'
02-21 18:31:52 D/Device: Uploading file onto device '0123456789012345'
02-21 18:31:54 D/InstrumentationTest: Collecting test info for com.android.cts.preconditions on device 0123456789012345
02-21 18:31:54 I/RemoteAndroidTest: Running am instrument -w -r -e log true -e timeout_msec 300000 com.android.cts.preconditions/android.support.test.runner.AndroidJUnitRunner on intel-full_aosp_on_sofia-0123456789012345
02-21 18:31:56 I/RemoteAndroidTest: Running am instrument -w -r -e log false -e timeout_msec 300000 com.android.cts.preconditions/android.support.test.runner.AndroidJUnitRunner on intel-full_aosp_on_sofia-0123456789012345
02-21 18:31:56 D/BackgroundDeviceAction: Starting logcat for 0123456789012345.
02-21 18:31:58 D/TestDevice: Uninstalling com.android.cts.preconditions
02-21 18:32:08 E/TestInvocation: Caught exception while running invocation
02-21 18:32:08 E/TestInvocation: Unexpected contents in directory /tmp/android-cts-media
com.android.tradefed.targetprep.TargetSetupError: Unexpected contents in directory /tmp/android-cts-media
at com.android.cts.tradefed.targetprep.HostPreconditionPreparer.updateLocalMediaPath(HostPreconditionPreparer.java:248)
at com.android.cts.tradefed.targetprep.HostPreconditionPreparer.createLocalMediaPath(HostPreconditionPreparer.java:391)
at com.android.cts.tradefed.targetprep.HostPreconditionPreparer.runMediaPrecondition(HostPreconditionPreparer.java:507)
at com.android.cts.tradefed.targetprep.HostPreconditionPreparer.setUp(HostPreconditionPreparer.java:535)
at com.android.tradefed.invoker.TestInvocation.doSetup(TestInvocation.java:556)
at com.android.tradefed.invoker.TestInvocation.prepareAndRun(TestInvocation.java:547)
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)
02-21 18:32:08 D/RunUtil: run interrupt allowed: false
02-21 18:33:05 I/LogFileSaver: Saved log file /home/lbp/dev/cts/./android-cts/tools/../../android-cts/repository/logs/2016.02.21_18.31.51/target_setup_error_bugreport_2086352445259579401.zip
02-21 18:33:05 I/0123456789012345: Saved log target_setup_error_bugreport_2086352445259579401.zip
02-21 18:33:05 I/FileSystemLogSaver: Saved log file /tmp/2566412/cts/inv_3208448448450268121/target_setup_error_bugreport_2382954311699370436.zip
Upvotes: 1
Views: 6363
Reputation: 2655
Example :
run cts -p android.telecom --skip-preconditions
Or you can manually copy media files to /sdcard/test folder.
Also, you can try deleting android-cts-media from /tmp folder in ur PC . And then download CTS media files from CTS media files . Its a 1.8 gb file(android-cts-media-1.1.zip) .And then copy the downloaded file to /tmp/
Upvotes: 4
Reputation: 11
Delete the folder "/tmp/android-cts-media" and zip file /tmp/android-cts-media.zip on your host machine (PC), then try running CTS again. It will download the media files first time triggering CTS. wait until download done.
Upvotes: 1