Android Q - VTS environment setup on ubuntu16.04

1.9k Views Asked by At

I have ubuntu 16.04 with Python2.7 and Python3.5 installed, but when I try to run VTS on a Android Q device, I got below error:

01-16 11:42:33 E/FormattedGeneratorReporter: Failed to install pip module enum xxx
com.android.tradefed.targetprep.TargetSetupError: Failed to install pip module enum xxx
    at com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.installDeps(VtsPythonVirtualenvPreparer.java:300)
    at com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer.setUp(VtsPythonVirtualenvPreparer.java:135)
    at com.android.tradefed.invoker.InvocationExecution.runMultiTargetPreparers(InvocationExecution.java:288)
    at com.android.tradefed.invoker.InvocationExecution.doSetup(InvocationExecution.java:217)
    at com.android.tradefed.invoker.TestInvocation.prepareAndRun(TestInvocation.java:378)
    at com.android.tradefed.invoker.TestInvocation.performInvocation(TestInvocation.java:230)
    at com.android.tradefed.invoker.TestInvocation.invoke(TestInvocation.java:754)
    at com.android.tradefed.command.CommandScheduler$InvocationThread.run(CommandScheduler.java:591)

I have run the setup.sh in bin directory, but sounds like still some librar(y/ies) maybe missing.

I try to install PyPi module manually, but issue still exist.

2

There are 2 best solutions below

0
On

I had the same issue. It looks like there is a problem with Ubuntu 16.04 when running vts. I made a container with Ubuntu 18.04 and the tests work now without much effort.

Upgrade to Ubuntu 18.04 or use a container to install it there.

1
On

AOSP provides a script to setup the test-environment on the host:

test/vts/script/setup.sh