View and troubleshoot CTS tests

This page explains how to troubleshoot and fix issues related to CTS testing.

Fix out of memory error

If you encounter an out of memory error during CTS testing, such as java.lang.OutOfMemoryError: Java heap space, increase the maximum memory available during test run:

  1. Edit the cts-tradefed script in WORKING_DIRECTORY/cts/tools/cts-tradefed/etc/.

  2. Increase the number of Java virtual machine (JVM) threads by increasing the value for the -Xmx flag. The following example increases the value to 16 GB:

${JAVA_BINARY} $RDBG_FLAG -Xmx16g -XX:+HeapDumpOnOutOfMemoryError -cp ${JAR_PATH} -DCTS_ROOT=${CTS_ROOT} com.android.compatibility.common.tradefed.command.CompatibilityConsole "$@"

Fix issues with streaming tests

If you can't stream files from a remote server due to firewall restrictions, you must install video files on a local file server and run media tests locally. For more information, refer to Run media tests locally.